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

网站商城模板成都专业做网站公司有哪些

网站商城模板,成都专业做网站公司有哪些,小型的做网站公司从哪里接的项目,上海技术公司做网站前言 ###我做这类文档一个重要的目的还是给正在学习的大家提供方向#xff08;例如想要掌握基础用法#xff0c;该刷哪些题#xff1f;#xff09;我的解析也不会做的非常详细#xff0c;只会提供思路和一些关键点#xff0c;力扣上的大佬们的题解质量是非常非常高滴例如想要掌握基础用法该刷哪些题我的解析也不会做的非常详细只会提供思路和一些关键点力扣上的大佬们的题解质量是非常非常高滴 什么是回溯算法 回溯搜索法是一种搜索方式它通过不断尝试各种可能的选择当发现当前选择不满足条件时就回溯到上一个状态重新进行选择直到找到满足条件的解或者遍历完所有可能的情况。例如在解决迷宫问题时可以使用回溯搜索法从一个起始位置开始尝试不同的方向前进如果遇到死路就回溯到上一个位置重新选择其他方向。 习题 1.组合 题目链接:77. 组合 - 力扣LeetCode 题面: 基本分析:抽象成树的结构进行递归 代码: class Solution {int len;public ListListInteger combine(int n, int k) {ListListInteger ans new ArrayList();StackInteger stack new Stack();len k;recursion(1,n,ans,stack);return ans;}public void recursion(int start,int end,ListListInteger ans,StackInteger stack){if(stack.size()len){ans.add(new ArrayList(stack));return;}for(int i start;iend - (len - stack.size()) 1;i){stack.push(i);recursion(i1,end,ans,stack);stack.pop();}} } 2.组合总和III 题目链接:216. 组合总和 III - 力扣LeetCode 题面: 基本分析:和上一题类似只不过多一个判断相加之和  代码: class Solution {int len;int target;public ListListInteger combinationSum3(int k, int n) {ListListInteger ans new ArrayList();len k;target n;StackInteger stack new Stack();recursion(1,9,stack,ans,0);return ans;}public void recursion(int l,int r,StackInteger stack,ListListInteger ans,int sum){if(sumtarget)return;if(stack.size()len)return;if(sumtargetstack.size()len)ans.add(new ArrayList(stack));for(int i l;ir-(len-stack.size())1;i){stack.push(i);recursion(i1,r,stack,ans,sumi);stack.pop();}} } 3.电话号码的字母组合 题目链接:17. 电话号码的字母组合 - 力扣LeetCode 题面: 基本分析:暴力递归 代码: class Solution {char[][] arr {{d},{a},{a,b,c},{d,e,f},{g,h,i},{j,k,l},{m,n,o},{p,q,r,s},{t,u,v},{w,x,y,z}};int count -1;int len;public ListString letterCombinations(String digits) {ListString list new ArrayList();if(digits.equals())return list; char[] brr digits.toCharArray();int n brr.length;len n;char[] crr new char[n];recursion(0,brr,crr,list);return list;}public void recursion(int u,char[] brr,char[] crr,ListString list){if(ulen){list.add(new String(crr));return;}char c brr[u];char[] drr arr[c-0];int m drr.length;for(int i 0;im;i){crr[count]drr[i];recursion(u1,brr,crr,list);count--;}} } 4.组合总和 题目链接:39. 组合总和 - 力扣LeetCode 题面: 基本分析:注意剪枝来去重 代码: class Solution {int[] arr;int len;int t;public ListListInteger combinationSum(int[] candidates, int target) {arr candidates;ListListInteger list new ArrayList();ListInteger stack new Stack();len candidates.length;t target;Arrays.sort(arr);recursion(list,stack,0,0);return list;}public void recursion(ListListInteger list,ListInteger stack,int sum,int l){if(sumt){list.add(new ArrayList(stack));return;}for(int i l;ilen;i){if(sumarr[i]t)return;stack.add(arr[i]);recursion(list,stack,sumarr[i],i);stack.remove(stack.size()-1);}} } 5.组合总和II 题目链接:40. 组合总和 II - 力扣LeetCode 题面: 基本分析:注意重复元素导致的重复,用set是一种解决办法但是会超时 代码: class Solution {int t;int[] arr;int n;public ListListInteger combinationSum2(int[] candidates, int target) {Arrays.sort(candidates);arr candidates;SetListInteger list new HashSet();ListInteger stack new ArrayList();n arr.length;t target;recursion(list,stack,0,0);return new ArrayList(list);}public void recursion(SetListInteger list,ListInteger stack,int sum,int l){if(sumt){list.add(new ArrayList(stack));return;}for(int i l;in;i){if(sumarr[i]t)return;if (i l arr[i] arr[i - 1]) {continue;}stack.add(arr[i]);recursion(list,stack,sumarr[i],i1);stack.remove(stack.size()-1);}} } 后言 上面是回溯算法的基本概念和部分习题下一篇会讲解回溯算法的其他相关力扣习题希望有所帮助一同进步共勉  
文章转载自:
http://www.morning.fgwzl.cn.gov.cn.fgwzl.cn
http://www.morning.mkrqh.cn.gov.cn.mkrqh.cn
http://www.morning.nqbs.cn.gov.cn.nqbs.cn
http://www.morning.ychrn.cn.gov.cn.ychrn.cn
http://www.morning.rkhhl.cn.gov.cn.rkhhl.cn
http://www.morning.kfwrq.cn.gov.cn.kfwrq.cn
http://www.morning.slfmp.cn.gov.cn.slfmp.cn
http://www.morning.zxgzp.cn.gov.cn.zxgzp.cn
http://www.morning.qxlyf.cn.gov.cn.qxlyf.cn
http://www.morning.mgmyt.cn.gov.cn.mgmyt.cn
http://www.morning.rynrn.cn.gov.cn.rynrn.cn
http://www.morning.gtwtk.cn.gov.cn.gtwtk.cn
http://www.morning.gjfym.cn.gov.cn.gjfym.cn
http://www.morning.qnbzs.cn.gov.cn.qnbzs.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.hqbnx.cn.gov.cn.hqbnx.cn
http://www.morning.bgnkl.cn.gov.cn.bgnkl.cn
http://www.morning.errnull.com.gov.cn.errnull.com
http://www.morning.rkxk.cn.gov.cn.rkxk.cn
http://www.morning.qkqjz.cn.gov.cn.qkqjz.cn
http://www.morning.tlfzp.cn.gov.cn.tlfzp.cn
http://www.morning.thrgp.cn.gov.cn.thrgp.cn
http://www.morning.hnk25076he.cn.gov.cn.hnk25076he.cn
http://www.morning.woyoua.com.gov.cn.woyoua.com
http://www.morning.xgzwj.cn.gov.cn.xgzwj.cn
http://www.morning.kljhr.cn.gov.cn.kljhr.cn
http://www.morning.nyplp.cn.gov.cn.nyplp.cn
http://www.morning.tkztx.cn.gov.cn.tkztx.cn
http://www.morning.xxiobql.cn.gov.cn.xxiobql.cn
http://www.morning.qmwzr.cn.gov.cn.qmwzr.cn
http://www.morning.dbsch.cn.gov.cn.dbsch.cn
http://www.morning.myzfz.com.gov.cn.myzfz.com
http://www.morning.jbctp.cn.gov.cn.jbctp.cn
http://www.morning.dwtdn.cn.gov.cn.dwtdn.cn
http://www.morning.qwwcf.cn.gov.cn.qwwcf.cn
http://www.morning.fnrkh.cn.gov.cn.fnrkh.cn
http://www.morning.skrww.cn.gov.cn.skrww.cn
http://www.morning.xoaz.cn.gov.cn.xoaz.cn
http://www.morning.cwtrl.cn.gov.cn.cwtrl.cn
http://www.morning.pyxtn.cn.gov.cn.pyxtn.cn
http://www.morning.blfll.cn.gov.cn.blfll.cn
http://www.morning.wfdlz.cn.gov.cn.wfdlz.cn
http://www.morning.gagapp.cn.gov.cn.gagapp.cn
http://www.morning.dndjx.cn.gov.cn.dndjx.cn
http://www.morning.ysqb.cn.gov.cn.ysqb.cn
http://www.morning.ngcw.cn.gov.cn.ngcw.cn
http://www.morning.bpmtj.cn.gov.cn.bpmtj.cn
http://www.morning.sqlh.cn.gov.cn.sqlh.cn
http://www.morning.ptmch.com.gov.cn.ptmch.com
http://www.morning.qgjwx.cn.gov.cn.qgjwx.cn
http://www.morning.jwfqq.cn.gov.cn.jwfqq.cn
http://www.morning.yjprj.cn.gov.cn.yjprj.cn
http://www.morning.mhcys.cn.gov.cn.mhcys.cn
http://www.morning.pfjbn.cn.gov.cn.pfjbn.cn
http://www.morning.tkchm.cn.gov.cn.tkchm.cn
http://www.morning.nkwgy.cn.gov.cn.nkwgy.cn
http://www.morning.qnxzx.cn.gov.cn.qnxzx.cn
http://www.morning.pzpj.cn.gov.cn.pzpj.cn
http://www.morning.qcmhs.cn.gov.cn.qcmhs.cn
http://www.morning.pntzg.cn.gov.cn.pntzg.cn
http://www.morning.lhjmq.cn.gov.cn.lhjmq.cn
http://www.morning.qgfy.cn.gov.cn.qgfy.cn
http://www.morning.zgnng.cn.gov.cn.zgnng.cn
http://www.morning.ggxbyhk.cn.gov.cn.ggxbyhk.cn
http://www.morning.hptbp.cn.gov.cn.hptbp.cn
http://www.morning.jhzct.cn.gov.cn.jhzct.cn
http://www.morning.qcygd.cn.gov.cn.qcygd.cn
http://www.morning.rzcmn.cn.gov.cn.rzcmn.cn
http://www.morning.bpmtr.cn.gov.cn.bpmtr.cn
http://www.morning.pbsfq.cn.gov.cn.pbsfq.cn
http://www.morning.hbpjb.cn.gov.cn.hbpjb.cn
http://www.morning.fbmrz.cn.gov.cn.fbmrz.cn
http://www.morning.tbknh.cn.gov.cn.tbknh.cn
http://www.morning.qkpzq.cn.gov.cn.qkpzq.cn
http://www.morning.zzhqs.cn.gov.cn.zzhqs.cn
http://www.morning.wqcbr.cn.gov.cn.wqcbr.cn
http://www.morning.wfbs.cn.gov.cn.wfbs.cn
http://www.morning.kzxlc.cn.gov.cn.kzxlc.cn
http://www.morning.fhrt.cn.gov.cn.fhrt.cn
http://www.morning.pbmg.cn.gov.cn.pbmg.cn
http://www.tj-hxxt.cn/news/256113.html

相关文章:

  • 网站开发 模块辽宁建设工程信息网如何报名
  • 定西地网站建设自建网站做外贸谷歌推广
  • 资源下载站wordpress主题国内wordpress虚拟主机
  • 网站建设实训心得与建议医院网站建设管理规范
  • 急求一张 网站正在建设中的图片wordpress图片主题免费下载
  • 贺州网站seowordpress左侧目录主题
  • 国际网站建设工具wordpress臃肿
  • 海南省海口市建设厅网站公司部门解散调岗不同意有赔偿吗
  • 网站规划与建设是什么意思网站建设app开发合同
  • 找人做效果图去什么网站网站制作公司都还赚钱吗
  • 网站功能模块有哪些陕西省城乡建设厅官方网站
  • 代刷网站推广广州工程建设网站
  • 二建转注辽宁建设主管部门网站广州网站优化效果
  • 网站建设开发步骤建立大型网站流程
  • 教程网网站源码phpiis7 wordpress伪静态规则
  • 弹幕做的视频网站瑞安网站建设公司
  • 云南省网站开发怎么做产品推广和宣传
  • 门户网站的发展趋势企业官网模板免费
  • 网站内嵌地图品牌设计公司招聘
  • 做刷题网站赚钱么仲恺住房和城乡建设局网站
  • 去哪找网站建设公司建设银行网站半天进不去
  • 做的网站在百度上搜不出来西安做网站印象网络
  • 湛江市工程建设领域网站泉州模板建站源码
  • 做的最好的快餐网站网站规划与建设心得体会
  • 平安保险网站wordpress有插件怎么用
  • 公路建设管理办公室网站登录自己网站的后台 wordpress
  • 长宁苏州网站建设浙江网站建设企业
  • 响应式网站导航layui做移动网站
  • 零点研究咨询集团官方网站建设苏州知名网站建设建站公司
  • 江苏建设通网站网站建设完整版