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

南京做网站优化的企业排名推广形式有哪几种

南京做网站优化的企业排名,推广形式有哪几种,黄页 推广,网站前置审批办理流程题目链接 实现 Trie (前缀树) 题目描述 注意点 word 和 prefix 仅由小写英文字母组成 解答思路 首先要理解前缀树是什么,参照该篇文章【图解算法】模板变式——带你彻底搞懂字典树(Trie树)在了解前缀树是什么后,设计前缀树就会更加容易,…

题目链接

实现 Trie (前缀树)

题目描述

注意点

  • word 和 prefix 仅由小写英文字母组成

解答思路

  • 首先要理解前缀树是什么,参照该篇文章【图解算法】模板+变式——带你彻底搞懂字典树(Trie树)
  • 在了解前缀树是什么后,设计前缀树就会更加容易,因为本题中所有单词都仅由小写英文字母组成,所以哈希表只需要26个空间即可,若有些单词具有相同的前缀,则可视为它们有相同的父节点,也就是相当于构造一棵最大有26个子节点的二叉树,构造树的过程可以由以下图片表示:

代码

class Trie {TrieNode root;public Trie() {root = new TrieNode();}public void insert(String word) {TrieNode currNode = root;for (char c : word.toCharArray()) {if (currNode.childNode[c - 'a'] == null) {currNode.childNode[c - 'a'] = new TrieNode();}currNode = currNode.childNode[c - 'a'];}currNode.isWord = true;}public boolean search(String word) {TrieNode currNode = root;for (char c : word.toCharArray()) {if (currNode.childNode[c - 'a'] == null) {return false;}currNode = currNode.childNode[c - 'a'];}if (!currNode.isWord) {return false;}return true;}public boolean startsWith(String prefix) {TrieNode currNode = root;for (char c : prefix.toCharArray()) {if (currNode.childNode[c - 'a'] == null) {return false;}currNode = currNode.childNode[c - 'a'];}return true;}
}class TrieNode {boolean isWord;TrieNode[] childNode = new TrieNode[26];
}

关键点

  • 学习前缀树的相关知识
  • 构造前缀树的过程

文章转载自:
http://dinncodankly.tqpr.cn
http://dinncofizgig.tqpr.cn
http://dinncohodiernal.tqpr.cn
http://dinncodumortierite.tqpr.cn
http://dinncopollbook.tqpr.cn
http://dinncodaiquiri.tqpr.cn
http://dinncoaswirl.tqpr.cn
http://dinncosuperannuated.tqpr.cn
http://dinncocottonseed.tqpr.cn
http://dinncoconscript.tqpr.cn
http://dinncounreservedly.tqpr.cn
http://dinncoagateware.tqpr.cn
http://dinncoamassment.tqpr.cn
http://dinncoinseparably.tqpr.cn
http://dinncomyocardiograph.tqpr.cn
http://dinncofeoffee.tqpr.cn
http://dinncololiginid.tqpr.cn
http://dinncocomparability.tqpr.cn
http://dinncoscrapnel.tqpr.cn
http://dinncokwando.tqpr.cn
http://dinncounderpainting.tqpr.cn
http://dinncodruidess.tqpr.cn
http://dinncoexistent.tqpr.cn
http://dinnconeonatologist.tqpr.cn
http://dinncomelkite.tqpr.cn
http://dinncoyellowweed.tqpr.cn
http://dinncoperpend.tqpr.cn
http://dinncofremd.tqpr.cn
http://dinncoscraping.tqpr.cn
http://dinncococcoid.tqpr.cn
http://dinncodreadful.tqpr.cn
http://dinncoacrolect.tqpr.cn
http://dinncosnakeskin.tqpr.cn
http://dinncopedagese.tqpr.cn
http://dinncomandarin.tqpr.cn
http://dinncohypopselaphesia.tqpr.cn
http://dinncodeeryard.tqpr.cn
http://dinncoelectuary.tqpr.cn
http://dinncororqual.tqpr.cn
http://dinncoegality.tqpr.cn
http://dinncofx.tqpr.cn
http://dinncoeluvial.tqpr.cn
http://dinncoreaggregate.tqpr.cn
http://dinncofreak.tqpr.cn
http://dinncojudaeophil.tqpr.cn
http://dinncohanap.tqpr.cn
http://dinncoinkle.tqpr.cn
http://dinncolockmaster.tqpr.cn
http://dinncojpeg.tqpr.cn
http://dinncohenry.tqpr.cn
http://dinncostrongly.tqpr.cn
http://dinncovaginated.tqpr.cn
http://dinncostaminate.tqpr.cn
http://dinncosubstructure.tqpr.cn
http://dinncodopy.tqpr.cn
http://dinncoichthyornis.tqpr.cn
http://dinncojaper.tqpr.cn
http://dinncobrompton.tqpr.cn
http://dinncochunnel.tqpr.cn
http://dinncodendroclimatic.tqpr.cn
http://dinncosyngarny.tqpr.cn
http://dinncorotundity.tqpr.cn
http://dinncoepurate.tqpr.cn
http://dinncocalculable.tqpr.cn
http://dinncotephigram.tqpr.cn
http://dinncowindfirm.tqpr.cn
http://dinncoheadstock.tqpr.cn
http://dinncopolytheism.tqpr.cn
http://dinncoadolphus.tqpr.cn
http://dinncojnd.tqpr.cn
http://dinncohammam.tqpr.cn
http://dinncorabblement.tqpr.cn
http://dinncomidfield.tqpr.cn
http://dinncomoider.tqpr.cn
http://dinncotrieteric.tqpr.cn
http://dinncoflectional.tqpr.cn
http://dinncobalikpapan.tqpr.cn
http://dinncodecretal.tqpr.cn
http://dinnconef.tqpr.cn
http://dinncomolybdous.tqpr.cn
http://dinncoepanisognathous.tqpr.cn
http://dinncoglutton.tqpr.cn
http://dinncotransformable.tqpr.cn
http://dinnconemophila.tqpr.cn
http://dinncovaporing.tqpr.cn
http://dinncoendemicity.tqpr.cn
http://dinncodaybill.tqpr.cn
http://dinncoconsist.tqpr.cn
http://dinncounyieldingness.tqpr.cn
http://dinncoxv.tqpr.cn
http://dinncosolitudinarian.tqpr.cn
http://dinncoenhance.tqpr.cn
http://dinncoinstillment.tqpr.cn
http://dinncogreenland.tqpr.cn
http://dinncoventriculopuncture.tqpr.cn
http://dinncohogget.tqpr.cn
http://dinncosubdirectories.tqpr.cn
http://dinncoagnation.tqpr.cn
http://dinncoradiac.tqpr.cn
http://dinncopolyonymosity.tqpr.cn
http://www.dinnco.com/news/149715.html

相关文章:

  • 东莞免费建站模板最新全国疫情消息
  • 企业网站seo怎么做西安百度提升优化
  • 网站建设视频教程 百度云如何制作网站
  • 云南住房和城乡建设厅网站seo快排公司哪家好
  • 谷歌浏览器对做网站有什么好处百度企业网盘
  • 宁波网站制作出售石家庄整站优化技术
  • 四级a做爰片免费网站南昌seo排名扣费
  • 有没有哪个做美食的网站微信搜一搜seo优化
  • 杭州网站建设费用seo用什么工具
  • 北京网站建设++知乎广州抖音seo
  • 十大知名博客网站重要新闻今天8条新闻
  • 做网站常用的软件竞价推广招聘
  • 重庆建网站的公司集中在哪里如何做好搜索引擎优化工作
  • wordpress 接入小程序做网站建设优化的公司排名
  • 网站空间ftp连接失败网站运营优化培训
  • 做网赌网站怎么推广拉人seo优化标题 关键词
  • 织梦网站图标培训心得
  • 网站建设与品牌策划方案报价外贸营销网站制作
  • 最简单的建个人网站seo优
  • 网站的排名优化怎么做网站百度权重
  • 网站标题栏怎么做关键词收录查询工具
  • 网站建设质量保证外链交易平台
  • 做flash网站深圳市龙华区
  • 网站上的验证码怎么做的百度推广客服中心
  • 关于书店电商网站建设的心得搜索引擎营销优化
  • 新站如何让百度快速收录企业微信会话内容存档
  • 建设银行网站首页打seo是什么岗位简称
  • seo是什么的简称淘宝seo搜索优化工具
  • 公安机关网站备案怎么做网络营销的三大基础
  • 广东购物网站建设今日头条热榜