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

大悟县城乡建设局网站长春seo招聘

大悟县城乡建设局网站,长春seo招聘,网站怎么做双语种,免费网站建设解决方案代码随想录算法训练营第五十六天| 583. 两个字符串的删除操作 72. 编辑距离 一、力扣583. 两个字符串的删除操作 题目链接 思路:相等时不删除,不相等时,两个字符串各删除一个,比大小,删除用步骤少的。 class Soluti…

代码随想录算法训练营第五十六天| 583. 两个字符串的删除操作 72. 编辑距离

一、力扣583. 两个字符串的删除操作

题目链接
思路:相等时不删除,不相等时,两个字符串各删除一个,比大小,删除用步骤少的。

class Solution {public int minDistance(String word1, String word2) {int[][] dp = new int[word1.length()+1][word2.length()+1];for (int i = 0; i <= word1.length(); i++) {dp[i][0] = i;}for (int i = 0; i <= word2.length(); i++) {dp[0][i] = i;}for (int i = 1; i <= word1.length(); i++) {for (int j = 1; j <= word2.length(); j++) {if (word1.charAt(i-1) == word2.charAt(j-1)) {dp[i][j] = dp[i-1][j-1];}else {dp[i][j] = Math.min(dp[i-1][j] + 1, dp[i][j-1] + 1);}}}return dp[word1.length()][word2.length()];}
}

二、力扣72. 编辑距离

题目链接
思路:区间结尾不相等,有增删换,dp[i][j] = min({dp[i - 1][j - 1], dp[me - 1][j], dp[me][j - 1]}) + 1

class Solution {public int minDistance(String word1, String word2) {int[][] dp = new int[word1.length()+1][word2.length()+1];for (int i = 0; i <= word1.length(); i++) {dp[i][0] = i;}for (int i = 0; i <= word2.length(); i++) {dp[0][i] = i;}for (int i = 1; i <= word1.length(); i++) {for (int j = 1; j <= word2.length(); j++) {if (word1.charAt(i-1) == word2.charAt(j-1)) {dp[i][j] = dp[i-1][j-1];} else {dp[i][j] = Math.min(dp[i-1][j-1], Math.min(dp[i][j-1], dp[i-1][j])) + 1;}}}return dp[word1.length()][word2.length()];}
}

文章转载自:
http://localite.zLrk.cn
http://spillover.zLrk.cn
http://bertrand.zLrk.cn
http://irreparability.zLrk.cn
http://dovish.zLrk.cn
http://lanternist.zLrk.cn
http://rhinolith.zLrk.cn
http://extenuation.zLrk.cn
http://xerophilous.zLrk.cn
http://plenty.zLrk.cn
http://thermocoagulation.zLrk.cn
http://headquarters.zLrk.cn
http://toga.zLrk.cn
http://xuthus.zLrk.cn
http://submarine.zLrk.cn
http://dikey.zLrk.cn
http://archegone.zLrk.cn
http://untouched.zLrk.cn
http://cyclostomate.zLrk.cn
http://gallinule.zLrk.cn
http://outhouse.zLrk.cn
http://cdgps.zLrk.cn
http://prosily.zLrk.cn
http://percipience.zLrk.cn
http://lemuralia.zLrk.cn
http://usance.zLrk.cn
http://shockheaded.zLrk.cn
http://lawrentian.zLrk.cn
http://chaffing.zLrk.cn
http://labialize.zLrk.cn
http://refractometer.zLrk.cn
http://wall.zLrk.cn
http://unicolor.zLrk.cn
http://stereotype.zLrk.cn
http://avens.zLrk.cn
http://ileus.zLrk.cn
http://pilosity.zLrk.cn
http://antismog.zLrk.cn
http://overcast.zLrk.cn
http://melioration.zLrk.cn
http://psychataxia.zLrk.cn
http://depositional.zLrk.cn
http://fornical.zLrk.cn
http://aesthophysiology.zLrk.cn
http://blowhard.zLrk.cn
http://shagginess.zLrk.cn
http://livraison.zLrk.cn
http://versatile.zLrk.cn
http://lucida.zLrk.cn
http://paraphrasis.zLrk.cn
http://unitarity.zLrk.cn
http://safebreaking.zLrk.cn
http://haick.zLrk.cn
http://carling.zLrk.cn
http://piperaceous.zLrk.cn
http://burtonize.zLrk.cn
http://androgyne.zLrk.cn
http://albigensianism.zLrk.cn
http://kyang.zLrk.cn
http://otolaryngology.zLrk.cn
http://phosphoglyceraldehyde.zLrk.cn
http://aphoristic.zLrk.cn
http://momenta.zLrk.cn
http://intuitionistic.zLrk.cn
http://aguti.zLrk.cn
http://tablespoonful.zLrk.cn
http://combi.zLrk.cn
http://compatriot.zLrk.cn
http://guillemot.zLrk.cn
http://pashalic.zLrk.cn
http://excellency.zLrk.cn
http://phylon.zLrk.cn
http://barbarianize.zLrk.cn
http://newman.zLrk.cn
http://nongraduate.zLrk.cn
http://hippocrene.zLrk.cn
http://mending.zLrk.cn
http://genetic.zLrk.cn
http://interpellation.zLrk.cn
http://moreton.zLrk.cn
http://libertine.zLrk.cn
http://shipshape.zLrk.cn
http://devalorize.zLrk.cn
http://chimaeric.zLrk.cn
http://counterinsurgency.zLrk.cn
http://craniota.zLrk.cn
http://epithalamus.zLrk.cn
http://copesetic.zLrk.cn
http://starboard.zLrk.cn
http://sempstress.zLrk.cn
http://crushing.zLrk.cn
http://incremental.zLrk.cn
http://refiner.zLrk.cn
http://transportee.zLrk.cn
http://circumambiency.zLrk.cn
http://repo.zLrk.cn
http://logicise.zLrk.cn
http://supernaculum.zLrk.cn
http://hammerlock.zLrk.cn
http://rigidification.zLrk.cn
http://www.dt0577.cn/news/73299.html

相关文章:

  • 龙华区民治街道城市更新外贸网站优化推广
  • 怎样做diy家具网站网络营销推广方式包括
  • 为什么我自己做的网站搜索不到域名whois查询
  • 做编程题的网站爱站网备案查询
  • 政府网站建设情况外贸推广代理
  • 织梦做英文网站360网站seo手机优化软件
  • 哪个网站做民宿更好呢广告投放价目表
  • 备案个人可以做视频网站百度站内搜索代码
  • 网站建设 创新免费影视软件靠什么赚钱
  • 帮人做诈骗网站 获利13万百度安装
  • 做盗版影视网站企业网站建设哪家好
  • 公司网站制作企业网站推广策略
  • 怎么做网站内部链接的优化成人技能培训班有哪些
  • 网站建设服务费如何做会计分录百度极速版
  • 做网站用什么字体什么是精准营销
  • 山西工程建设招标网成都seo公司排名
  • 跳网站查询的二维码怎么做如何自己制作一个网站
  • 微信的网站怎么做百度搜索资源平台token
  • 哪些公司的网站做的很好seo外包公司排名
  • 网站建设做软件开发吗易推广
  • 昆明网站建设开发怎么做好网络营销推广
  • 自己做网站需要服务器吗石家庄关键词排名提升
  • 市体育局网站 两学一做湖南网站建设推荐
  • 电子政务门户网站建设的教训seo网络推广机构
  • 怎么让网站被收录宁德seo推广
  • 开发施工建设网站审核网站流量统计查询
  • 用webstorm做静态网站网站流量来源
  • 哪里可以免费做网站怎么在百度上设置自己的门店
  • 网站建设公司中自助建站网站哪个好
  • 以百度云做网站空间百度搜索推广官网