当前位置: 首页 > news >正文

网站模版的优化wordpress 清爽主题

网站模版的优化,wordpress 清爽主题,做电影网站侵权吗,深圳宝安网站建设公司推荐1. 题目 设计一个支持以下两种操作的数据结构#xff1a; void addWord(word) bool search(word) search(word) 可以搜索文字或正则表达式字符串#xff0c;字符串只包含字母 . 或 a-z 。 . 可以表示任何一个字母。 示例: addWord(bad) addWord(dad void addWord(word) bool search(word) search(word) 可以搜索文字或正则表达式字符串字符串只包含字母 . 或 a-z 。 . 可以表示任何一个字母。 示例: addWord(bad) addWord(dad) addWord(mad) search(pad) - false search(bad) - true search(.ad) - true search(b..) - true 说明: 你可以假设所有单词都是由小写字母 a-z 组成的。来源力扣LeetCode 链接https://leetcode-cn.com/problems/add-and-search-word-data-structure-design 著作权归领扣网络所有。商业转载请联系官方授权非商业转载请注明出处。 2. Trie解题 构建Trie树回溯查找遇见.在所有的子树里查找没有遇见.在当前相等的情况下再继续在所有的子树中递归查找 class TrieNode { public:char ch;TrieNode *next[26];bool isEnd;TrieNode(char c /):ch(c),isEnd(false) {memset(next, 0, sizeof(TrieNode*)*26);} }; class Trie { public:TrieNode *root;Trie(){root new TrieNode();}~Trie(){destroy(root);}void destroy(TrieNode *root){if(root NULL)return;for(int i 0; i 26; i)destroy(root-next[i]);delete root;}void insert(string str){TrieNode *cur root;for(char s:str){if(cur-next[s-a] NULL)cur-next[s-a] new TrieNode(s);cur cur-next[s-a];}cur-isEnd true;} }; class WordDictionary {Trie tree; public:/** Initialize your data structure here. */WordDictionary() {}/** Adds a word into the data structure. */void addWord(string word) {tree.insert(word);}/** Returns if the word is in the data structure. A word could contain the dot character . to represent any one letter. */bool search(string word) {TrieNode *cur tree.root;bool found false;for(int i 0; i 26; i){find(word,cur-next[i],0,found);}return found;}void find(string word, TrieNode *root, int idx, bool found){if(found || !root)return;if(idx word.size()-1){if(root-isEnd)if(word[idx] . || word[idx] root-ch)found true;return;}if((word[idx] ! .root-ch word[idx])|| word[idx] .){ for(int i 0; i 26; i){find(word,root-next[i],idx1,found);}}} };
http://www.huolong8.cn/news/130066/

相关文章:

  • 成都便宜网站建设公司哪家好wordpress柳城
  • 网站建设需要哪些材料如何避免网站被攻击
  • wordpress 仿站 教程网深圳网站建设公
  • 网站建设制作报价宜都网站设计
  • 排名好的网站关键词优化企业wordpress 官网主题下载
  • 网站如何设定关键词深圳前十名代运营公司
  • 常德海关网站app开发模板
  • 模板的网站都有哪些内容机构网站建设需要交费吗
  • 深圳网站开发费用如何细分行业 做网站赚钱
  • 网站后台图片并排怎么做wordpress时间轴页面
  • 网站建设的主要问题烟台市建设工程质量监督站网站
  • 网站建设服务市场细分wordpress连接数据库
  • 乐清站在哪网站开发设计软件
  • 免费做网站通栏广告重庆高端网站设计
  • flash代码做网站教程大连在哪个省
  • 网站登录验证码怎么做江西宜春网站建设报价
  • 网站质作广东新闻联播在线直播
  • 友情链接网站被降权福州网页
  • 网站icp没有备案怎么检查wordpress 侧边栏 固定
  • 代做网站关键词排名五指山网站建设
  • 芜湖市网站开发常州做网站的
  • 护肤品网站制作 网新科技宿迁建设公司网站
  • 网站模板破解版博客 系统 wordpress
  • 网站建设 技术方案网站的联网信息怎么填
  • 手机网站建设比较好的公司网站建设端口
  • 网站建设岗位职责简述网站建设的流程做成一个页面
  • 香飘飘网站平台建设网络推广网站培训
  • 百事通做网站电子商务网站建设技术方案
  • 公众号怎么制作长图东莞seo建站推广费用
  • paypal客户端网站建设评价做资料上哪个网站好