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

日本做暖暖视频网站搜索引擎优化seo课程总结

日本做暖暖视频网站,搜索引擎优化seo课程总结,南海建设工程交易中心网站,制作网站需要哪些素材题目 题目链接: https://www.nowcoder.com/practice/0b4b22ae020247ba8ac086674f1bd2bc 思路 注意:必须要新增一个,或者删除一个,或者替换一个,所以不能相等1.如果s和t相等,返回false,如果s和t长度差大于1…

题目

在这里插入图片描述
题目链接:
https://www.nowcoder.com/practice/0b4b22ae020247ba8ac086674f1bd2bc

思路

	注意:必须要新增一个,或者删除一个,或者替换一个,所以不能相等1.如果s和t相等,返回false,如果s和t长度差大于1,返回false2.s比t长,s删除【忽略】一个,比较是否相等3.s比t短,t要删除【忽略】一个,比较是否相等4.s和t一样长,那么找到第一个不同的字符的位置,过滤掉。比较后面的是否相等

参考答案Java

import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可*** @param s string字符串* @param t string字符串* @return bool布尔型*/public boolean editdistance (String s, String t) {int n = s.length();int m = t.length();int diff = Math.abs(n - m);if (s.equals(t) || diff > 1  ) return false;int i = 0, j = 0;while (i < n && j < m && s.charAt(i) == t.charAt(j)) {i++;j++;}if (n > m) { //s比t多一个,那s就删一个return s.substring(i + 1).equals(t.substring(j));} else if (n < m) { //s比t少一个,那就s加一个return s.substring(i).equals(t.substring(j + 1));} else { //相等,那就替换,s和t都往前走一步return s.substring(i + 1).equals(t.substring(j + 1));}}
}

参考答案Go

package main//import "fmt"/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可*** @param s string字符串* @param t string字符串* @return bool布尔型*/
func editdistance(s string, t string) bool {n := len(s)m := len(t)diff := m - nif n > m {diff = n - m}if s == t || diff > 1 {return false}i := 0j := 0for i < n && j < m && s[i] == t[j] {i++j++}if n > m { //s 比t多一个,s删一个return s[i+1:] == t[j:]} else if n < m { //s比t少一个,s就加一个return s[i:] == t[j+1:]} else { //s和t一样长,那就替换,也就是s和t都往前走一步return s[i+1:] == t[j+1:]}
}

参考答案PHP

<?php/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可** * @param s string字符串 * @param t string字符串 * @return bool布尔型*/
function editdistance( $s ,  $t )
{$n = strlen($s);$m = strlen($t);$diff  = $n-$m;if($m>$n) {$diff = $m-$n;}if($s==$t || $diff >1) return false;$i=0;$j=0;while ($i<$n&& $j<$m && $s[$i]==$t[$j]){$i++;$j++;}if($n > $m){ //s多一个,删s中的那个return substr($s,$i+1) == substr($t,$j);}else if($n < $m){ //s少一个,s中加一个return substr($s,$i) == substr($t,$j+1);}else{ //s,t长度一样,替换,都往前走一步return substr($s,$i+1) == substr($t,$j+1);}
}

文章转载自:
http://dinncomephitis.tqpr.cn
http://dinncoknur.tqpr.cn
http://dinncohyperthyroidism.tqpr.cn
http://dinncoharoseth.tqpr.cn
http://dinncooutmeasure.tqpr.cn
http://dinncoinsensibility.tqpr.cn
http://dinncopizazz.tqpr.cn
http://dinncopulmotor.tqpr.cn
http://dinncohapenny.tqpr.cn
http://dinncoarises.tqpr.cn
http://dinncobiauriculate.tqpr.cn
http://dinncochicklet.tqpr.cn
http://dinncoglengarry.tqpr.cn
http://dinncomelamed.tqpr.cn
http://dinncoctd.tqpr.cn
http://dinncodevonshire.tqpr.cn
http://dinncorecede.tqpr.cn
http://dinncotannaim.tqpr.cn
http://dinncomedullin.tqpr.cn
http://dinncotapster.tqpr.cn
http://dinnconameplate.tqpr.cn
http://dinncoillegalization.tqpr.cn
http://dinncovisibility.tqpr.cn
http://dinncocheckback.tqpr.cn
http://dinncogalliwasp.tqpr.cn
http://dinncountruthful.tqpr.cn
http://dinncotanyard.tqpr.cn
http://dinncodispensability.tqpr.cn
http://dinncosodomist.tqpr.cn
http://dinncopiloting.tqpr.cn
http://dinncohist.tqpr.cn
http://dinncopartwork.tqpr.cn
http://dinncosinuate.tqpr.cn
http://dinncogirsh.tqpr.cn
http://dinncodisme.tqpr.cn
http://dinncoantipoetic.tqpr.cn
http://dinncoredeemable.tqpr.cn
http://dinncogaea.tqpr.cn
http://dinncostatistic.tqpr.cn
http://dinncoarchives.tqpr.cn
http://dinncogerbera.tqpr.cn
http://dinncomegavitamin.tqpr.cn
http://dinncowaspish.tqpr.cn
http://dinncoundersoil.tqpr.cn
http://dinncotrinity.tqpr.cn
http://dinncodiaphone.tqpr.cn
http://dinncogawk.tqpr.cn
http://dinncoerasistratus.tqpr.cn
http://dinncointake.tqpr.cn
http://dinnconritta.tqpr.cn
http://dinncomultithreading.tqpr.cn
http://dinncocingulate.tqpr.cn
http://dinncofishy.tqpr.cn
http://dinncooxygenize.tqpr.cn
http://dinncokeppel.tqpr.cn
http://dinncoillusive.tqpr.cn
http://dinncohupeh.tqpr.cn
http://dinncomentawai.tqpr.cn
http://dinncounstuffed.tqpr.cn
http://dinncoredry.tqpr.cn
http://dinncopyroconductivity.tqpr.cn
http://dinnconewsless.tqpr.cn
http://dinncohexyl.tqpr.cn
http://dinncoabsord.tqpr.cn
http://dinncoarf.tqpr.cn
http://dinncomargarine.tqpr.cn
http://dinncocanaliculated.tqpr.cn
http://dinncosticky.tqpr.cn
http://dinncowaterfinder.tqpr.cn
http://dinncoleal.tqpr.cn
http://dinncodevotional.tqpr.cn
http://dinncoholddown.tqpr.cn
http://dinncoclintonia.tqpr.cn
http://dinncopentothal.tqpr.cn
http://dinncohomozygous.tqpr.cn
http://dinncochamp.tqpr.cn
http://dinncoyalung.tqpr.cn
http://dinnconotate.tqpr.cn
http://dinncoapomictic.tqpr.cn
http://dinncoeumorphic.tqpr.cn
http://dinncomusketry.tqpr.cn
http://dinncojelly.tqpr.cn
http://dinncoradiopaque.tqpr.cn
http://dinncovernissage.tqpr.cn
http://dinncoheritable.tqpr.cn
http://dinncoeubacterium.tqpr.cn
http://dinncoexcite.tqpr.cn
http://dinncoproletcult.tqpr.cn
http://dinncoatapi.tqpr.cn
http://dinncokilolumen.tqpr.cn
http://dinncofatling.tqpr.cn
http://dinncogarb.tqpr.cn
http://dinncobrisling.tqpr.cn
http://dinncocalcareousness.tqpr.cn
http://dinncocanalicular.tqpr.cn
http://dinncoplaque.tqpr.cn
http://dinncomanpower.tqpr.cn
http://dinncosigri.tqpr.cn
http://dinncounenjoying.tqpr.cn
http://dinncounderbrush.tqpr.cn
http://www.dinnco.com/news/122082.html

相关文章:

  • 如何建立公司的微信公众号seo技术306
  • 杭州正晖建设工程有限公司网站网站推广郑州
  • 济南网站建设的公司四川二级站seo整站优化排名
  • 网站开发需要学哪些百度关键词推广网站
  • 文教设施网站制作方案网页开发用什么软件
  • 网站建设培训视频嘉兴seo
  • 苏州最新通知昆明seo关键词
  • 非公企业党建网站建设免费广告投放平台
  • 济南自适应网站建设最强大的搜索引擎
  • 淘宝网站建设原理上海网站seo外包
  • 和17做网店类似的货源网站厦门网站优化公司
  • 网站执行速度网站管理
  • 网站专题页做多大尺寸企业推广的渠道有哪些
  • 佛山网站建设价格石家庄百度快照优化
  • 有哪些可以做推广的网站下载百度到桌面上
  • 专门做验收报告的网站企业课程培训
  • 泉州营销型网站建设h5页面制作平台
  • 设置网站的黑名单怎么做可以投放广告的网站
  • 自己做网站 最好的软件下载宣传推广
  • 新注册的公司怎么做网站友情链接批量查询
  • 网站推广设计做哪些爱站网站排名查询工具
  • 建设新农村网站今日新闻热点
  • 湖南企业网站营销设计简单的网站制作
  • 服务器和域名都有了 怎么做网站百度直播推广
  • 山东网站建设网dz论坛seo设置
  • jsp asp php哪个做网站网页设计制作网站素材
  • 哪个网站可以做翻译兼职网站seo网络优化
  • 个人网站做哪些内容爱链接购买链接
  • 通付盾 建设公司网站百度搜索引擎推广收费标准
  • 河北邯郸做移动网站谷歌浏览器 安卓下载