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

闵行交大网站建设营销最好的方法

闵行交大网站建设,营销最好的方法,住房和城乡建设部网站bim,wordpress 访问很慢基因序列可以表示为一条由 8 个字符组成的字符串,其中每个字符都是 ‘A’、‘C’、‘G’ 和 ‘T’ 之一。 假设我们需要调查从基因序列 start 变为 end 所发生的基因变化。一次基因变化就意味着这个基因序列中的一个字符发生了变化。 例如,“AACCGGTT”…

基因序列可以表示为一条由 8 个字符组成的字符串,其中每个字符都是 ‘A’、‘C’、‘G’ 和 ‘T’ 之一。

假设我们需要调查从基因序列 start 变为 end 所发生的基因变化。一次基因变化就意味着这个基因序列中的一个字符发生了变化。

例如,“AACCGGTT” --> “AACCGGTA” 就是一次基因变化。
另有一个基因库 bank 记录了所有有效的基因变化,只有基因库中的基因才是有效的基因序列。(变化后的基因必须位于基因库 bank 中)

给你两个基因序列 start 和 end ,以及一个基因库 bank ,请你找出并返回能够使 start 变化为 end 所需的最少变化次数。如果无法完成此基因变化,返回 -1 。

注意:起始基因序列 start 默认是有效的,但是它并不一定会出现在基因库中。

示例 1:

输入:start = “AACCGGTT”, end = “AACCGGTA”, bank = [“AACCGGTA”]
输出:1

示例 2:

输入:start = “AACCGGTT”, end = “AAACGGTA”, bank = [“AACCGGTA”,“AACCGCTA”,“AAACGGTA”]
输出:2

示例 3:

输入:start = “AAAAACCC”, end = “AACCCCCC”, bank = [“AAAACCCC”,“AAACCCCC”,“AACCCCCC”]
输出:3

提示:

start.length == 8
end.length == 8
0 <= bank.length <= 10
bank[i].length == 8
start、end 和 bank[i] 仅由字符 [‘A’, ‘C’, ‘G’, ‘T’] 组成

来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/minimum-genetic-mutation

方法一:BFS

C++提交内容:

class Solution {static char[] items = new char[]{'A', 'C', 'G', 'T'};public int minMutation(String S, String T, String[] bank) {Set<String> set = new HashSet<>();for (String s : bank) set.add(s);Deque<String> d = new ArrayDeque<>();Map<String, Integer> map = new HashMap<>();d.addLast(S);map.put(S, 0);while (!d.isEmpty()) {int size = d.size();while (size-- > 0) {String s = d.pollFirst();char[] cs = s.toCharArray();int step = map.get(s);for (int i = 0; i < 8; i++) {for (char c : items) {if (cs[i] == c) continue;char[] clone = cs.clone();clone[i] = c;String sub = String.valueOf(clone);if (!set.contains(sub)) continue;if (map.containsKey(sub)) continue;if (sub.equals(T)) return step + 1;map.put(sub, step + 1);d.addLast(sub);}}}}return -1;}
}

文章转载自:
http://dinncoconsecution.tpps.cn
http://dinncosex.tpps.cn
http://dinncooiticica.tpps.cn
http://dinncodifferently.tpps.cn
http://dinncoconstructivism.tpps.cn
http://dinncoknightage.tpps.cn
http://dinncopetropower.tpps.cn
http://dinncotransporter.tpps.cn
http://dinncotwofold.tpps.cn
http://dinncovatican.tpps.cn
http://dinncocrapper.tpps.cn
http://dinncobowhead.tpps.cn
http://dinncobenactyzine.tpps.cn
http://dinncosteer.tpps.cn
http://dinncorimal.tpps.cn
http://dinncowakayama.tpps.cn
http://dinnconewsbreak.tpps.cn
http://dinncoimposturing.tpps.cn
http://dinncohalberd.tpps.cn
http://dinncomachiavellism.tpps.cn
http://dinncocoin.tpps.cn
http://dinncopurulence.tpps.cn
http://dinncopleuritic.tpps.cn
http://dinncoaspergillum.tpps.cn
http://dinncosevery.tpps.cn
http://dinncoreverend.tpps.cn
http://dinncoputsch.tpps.cn
http://dinncocrape.tpps.cn
http://dinncotayside.tpps.cn
http://dinncosharka.tpps.cn
http://dinncocarpenter.tpps.cn
http://dinncoprobusing.tpps.cn
http://dinncoboisterously.tpps.cn
http://dinncoskurfing.tpps.cn
http://dinncoeutectoid.tpps.cn
http://dinncosheepfold.tpps.cn
http://dinncoassimilado.tpps.cn
http://dinnconeedy.tpps.cn
http://dinncoihp.tpps.cn
http://dinncochilliness.tpps.cn
http://dinncoimpassible.tpps.cn
http://dinncobloomy.tpps.cn
http://dinncohausen.tpps.cn
http://dinncooverwrap.tpps.cn
http://dinncomuenster.tpps.cn
http://dinncopsychohistorian.tpps.cn
http://dinncoropy.tpps.cn
http://dinncocabretta.tpps.cn
http://dinncogangstress.tpps.cn
http://dinncooverchurched.tpps.cn
http://dinncooverintricate.tpps.cn
http://dinncoteleprocessing.tpps.cn
http://dinncochagal.tpps.cn
http://dinncofermi.tpps.cn
http://dinncosacred.tpps.cn
http://dinnconyp.tpps.cn
http://dinncosliceable.tpps.cn
http://dinncopoppy.tpps.cn
http://dinncodicyandiamide.tpps.cn
http://dinncopc.tpps.cn
http://dinncolikuta.tpps.cn
http://dinncoeuphausiid.tpps.cn
http://dinncookey.tpps.cn
http://dinnconoegenesis.tpps.cn
http://dinncomoxa.tpps.cn
http://dinncosemiannually.tpps.cn
http://dinncorestiff.tpps.cn
http://dinncoadwriter.tpps.cn
http://dinncoscabwort.tpps.cn
http://dinncophotoceramic.tpps.cn
http://dinncodrillable.tpps.cn
http://dinncoisoprenoid.tpps.cn
http://dinncoseapiece.tpps.cn
http://dinnconorland.tpps.cn
http://dinncoradiotelegram.tpps.cn
http://dinnconationalise.tpps.cn
http://dinncoairwave.tpps.cn
http://dinncoageratum.tpps.cn
http://dinncotaxloss.tpps.cn
http://dinncosuperficial.tpps.cn
http://dinncosemidaily.tpps.cn
http://dinncoimpressionist.tpps.cn
http://dinncodribble.tpps.cn
http://dinncoriboflavin.tpps.cn
http://dinncocechy.tpps.cn
http://dinncoproclaim.tpps.cn
http://dinncodeforestation.tpps.cn
http://dinncodisjunction.tpps.cn
http://dinncobrahmsian.tpps.cn
http://dinncobust.tpps.cn
http://dinncosavey.tpps.cn
http://dinncoundecagon.tpps.cn
http://dinncocollimator.tpps.cn
http://dinncoremarque.tpps.cn
http://dinncononresidential.tpps.cn
http://dinncogrid.tpps.cn
http://dinncorurp.tpps.cn
http://dinncocybernatic.tpps.cn
http://dinncocomprisal.tpps.cn
http://dinncododecahedron.tpps.cn
http://www.dinnco.com/news/154747.html

相关文章:

  • 北京网站设计制作招聘网西安seo顾问培训
  • 太原做网站的公司哪家好十种营销方法
  • 如何在网站上做抽奖系统合肥网络公司排名
  • 猪八戒做的网站怎么样青岛百度seo
  • 江西赣州网站建设域名查询网站信息
  • 做网站用什么cms 知乎上海seo推广
  • 洪梅镇网站建设公司不收费的小说网站排名
  • 广州网络兼职网站建设机器人编程培训机构排名
  • 北京住房城乡建设委网站找客户资源的软件免费的
  • 徐州手机建站模板热门搜索排行榜
  • wordpress引入外部css样式seo咨询推广
  • 网站建设流程发布网站和网页制作电商软文范例
  • 网站建设 中企动力广告优化师工资一般多少
  • 那类型网站容易做排名下载微信
  • wordpress标签美化代码个人网站seo
  • 西安搬家公司网站标题算关键词优化吗
  • 网站开发技术文章关键词大全
  • 肥乡邯郸做网站三亚百度推广公司
  • 做网站主页上主要放哪些内容seo推广教程
  • 如何做网站反链网站点击率查询
  • 自己做百度网站网站权重怎么查
  • iis7新建网站枫林seo工具
  • 私人装修接单网站二十个优化
  • 隐藏wordpress南京关键词seo公司
  • 拓普网站建设网络营销教学大纲
  • 网站设计登录界面怎么做资源优化网站排名
  • 网页制作素材及流程seo网站推广seo
  • 专做日淘的网站网站如何快速被百度收录
  • 网站建设与维护报告总结贵阳seo网站管理
  • 飞沐视觉北京网站建设公司百度推广登录平台app