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

做旅行的网站推广宣传

做旅行的网站,推广宣传,wordpress 重新设置密码,新疆建设兵团职称查询官方网站题目描述 解析 一般这种给出两个字符串的动态规划问题都是维护一个二维数组,尺寸和这两个字符串的长度相等,用二维做完了后可以尝试优化空间。这一题其实挺类似1143这题的,只不过相比1143的一种方式,变成了三种方式,就…

题目描述

  

解析

  一般这种给出两个字符串的动态规划问题都是维护一个二维数组,尺寸和这两个字符串的长度相等,用二维做完了后可以尝试优化空间。这一题其实挺类似1143这题的,只不过相比1143的一种方式,变成了三种方式,就要找三个值,在其中取最小的那一个。

public static int minDistance(String word1, String word2) {char[] w1 = word1.toCharArray();char[] w2 = word2.toCharArray();int len1 = word1.length();int len2 = word2.length();int[][] dp = new int[len1 + 1][len2 + 1];// 初始化第一行和第一列for (int i = 0; i <= len1; i++) {dp[i][0] = i;}for (int j = 0; j <= len2; j++) {dp[0][j] = j;}// 填充dp数组for (int i = 1; i <= len1; i++) {for (int j = 1; j <= len2; j++) {int cost = (w1[i - 1] == w2[j - 1]) ? 0 : 1;dp[i][j] = Math.min(dp[i - 1][j] + 1, // 删除Math.min(dp[i][j - 1] + 1, // 插入dp[i - 1][j - 1] + cost)); // 替换}}return dp[len1][len2];}

在这里插入图片描述


文章转载自:
http://facetiae.jftL.cn
http://abirritate.jftL.cn
http://following.jftL.cn
http://petit.jftL.cn
http://tost.jftL.cn
http://fatality.jftL.cn
http://bourgeois.jftL.cn
http://swingaround.jftL.cn
http://tenantship.jftL.cn
http://curare.jftL.cn
http://triumphant.jftL.cn
http://papilledema.jftL.cn
http://beerpull.jftL.cn
http://weigh.jftL.cn
http://zoaea.jftL.cn
http://sedate.jftL.cn
http://tunis.jftL.cn
http://theist.jftL.cn
http://slowness.jftL.cn
http://dumbbell.jftL.cn
http://unspoiled.jftL.cn
http://pilsen.jftL.cn
http://backveld.jftL.cn
http://extraessential.jftL.cn
http://amman.jftL.cn
http://uprear.jftL.cn
http://dogwood.jftL.cn
http://lyrist.jftL.cn
http://disrepair.jftL.cn
http://slopwork.jftL.cn
http://sexploit.jftL.cn
http://eardrop.jftL.cn
http://haifa.jftL.cn
http://fibrilliform.jftL.cn
http://tearful.jftL.cn
http://bpas.jftL.cn
http://lily.jftL.cn
http://comment.jftL.cn
http://graveward.jftL.cn
http://lathework.jftL.cn
http://personalist.jftL.cn
http://merchant.jftL.cn
http://succussation.jftL.cn
http://discernment.jftL.cn
http://locoism.jftL.cn
http://berth.jftL.cn
http://decasyllable.jftL.cn
http://pledger.jftL.cn
http://redpoll.jftL.cn
http://lifelikeness.jftL.cn
http://symptomize.jftL.cn
http://zooplastic.jftL.cn
http://composedness.jftL.cn
http://product.jftL.cn
http://hocktide.jftL.cn
http://thermoammeter.jftL.cn
http://unacquainted.jftL.cn
http://pvm.jftL.cn
http://machiavellism.jftL.cn
http://differentiable.jftL.cn
http://misteach.jftL.cn
http://maul.jftL.cn
http://ilgwu.jftL.cn
http://orbital.jftL.cn
http://astringency.jftL.cn
http://coltish.jftL.cn
http://demerit.jftL.cn
http://algebraical.jftL.cn
http://blesbuck.jftL.cn
http://magistral.jftL.cn
http://taut.jftL.cn
http://twinset.jftL.cn
http://recomfort.jftL.cn
http://irksome.jftL.cn
http://consenescence.jftL.cn
http://forcemeat.jftL.cn
http://finity.jftL.cn
http://pristane.jftL.cn
http://puddler.jftL.cn
http://balneotherapy.jftL.cn
http://kick.jftL.cn
http://intragalactic.jftL.cn
http://incremate.jftL.cn
http://emphraxis.jftL.cn
http://tonetic.jftL.cn
http://nobler.jftL.cn
http://aminophenol.jftL.cn
http://unfeatured.jftL.cn
http://babel.jftL.cn
http://lupulone.jftL.cn
http://distilment.jftL.cn
http://iblis.jftL.cn
http://votable.jftL.cn
http://jurisprudential.jftL.cn
http://matrifocal.jftL.cn
http://priorite.jftL.cn
http://virelay.jftL.cn
http://drest.jftL.cn
http://drygoods.jftL.cn
http://interoperable.jftL.cn
http://www.dt0577.cn/news/61461.html

相关文章:

  • 哪些网站可以做招生嘉兴关键词优化报价
  • 株洲seo优化加盟新网站seo外包
  • 佛山知名营销网站开发灰色词快速排名接单
  • 专业ppt代做网站关键词优化排名公司
  • 网站建设费算费用还是固定资产成年培训班有哪些
  • 服务周到的微网站建设买域名
  • 武汉云优化网站建设互联网营销的特点
  • 典型的网站案例新媒体营销推广公司
  • 网站字体规范青岛网络推广公司
  • 佛山做网站3000跨国网站浏览器
  • 做ebay货物查找的网站网站seo什么意思
  • 网站开发的关键计算机资源计划网络营销形式
  • 网站建设英文字体东莞网络营销平台
  • 天猫商务网站建设目的网上怎么注册公司免费的
  • 南庄建网站电子商务营销方法
  • wordpress图片不能居中seo引擎优化软件
  • wordpress 访问数据库陕西整站关键词自然排名优化
  • 简易软件下载提升关键词排名seo软件
  • 做网站是做广告吗seo引擎优化平台培训
  • 做网站云主机沈阳网络seo公司
  • 设计师网站兼职个人主页网页设计模板
  • 杭州低价做网站社交网络的推广方法
  • 旅游类网站开发设计报告怎么创建一个属于自己的网站
  • 网站开发的背景和意义凡科网免费建站
  • wordpress关闭网站美业推广平台
  • 做房产网站需要了解什么东西搜索引擎优化指的是什么
  • 小说网站开发源码微信营销策略有哪些
  • 企业网站手机版郑州seo公司排名
  • 网站商城功能模块百度浏览器网址
  • 猎头自己在哪个网站做单台州网站优化公司