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

群晖 做网站上海百度推广代理商

群晖 做网站,上海百度推广代理商,响应试企业网站,代理服务器地址文章目录 Leetcode 17-电话号码的字母组合题目描述解题思路 Leetcode 39-组合总数题目描述解题思路 Leetcode 216-组合总数 Ⅲ题目描述解题思路 Leetcode 17-电话号码的字母组合 题目描述 https://leetcode.cn/problems/letter-combinations-of-a-phone-number/description/ …

文章目录

  • Leetcode 17-电话号码的字母组合
    • 题目描述
    • 解题思路
  • Leetcode 39-组合总数
    • 题目描述
    • 解题思路
  • Leetcode 216-组合总数 Ⅲ
    • 题目描述
    • 解题思路

Leetcode 17-电话号码的字母组合

题目描述

https://leetcode.cn/problems/letter-combinations-of-a-phone-number/description/

在这里插入图片描述

解题思路

class Solution {
public:vector<string> res;string path = "";vector<string> list = {"abc", "def","ghi","jkl","mno","pqrs","tuv","wxyz"};void backTracking(string s, int startIndex){if (startIndex == s.size()){res.push_back(path);return;}int digits = s[startIndex]-'0'-2;for (int i = 0; i < list[digits].size();i++){path += list[digits][i];backTracking(s, startIndex+1);path.pop_back();//注意字符串移除的方式,不能使用-=}}vector<string> letterCombinations(string digits) {if (digits.size()==0) return {};backTracking(digits,0);return res;}
};

Leetcode 39-组合总数

题目描述

https://leetcode.cn/problems/combination-sum/description/

在这里插入图片描述

解题思路

class Solution {
public:vector<vector<int>> res;vector<int> path;void backTracking(vector<int>& candidates, int target, int startIndex, int sum){if (sum == target){res.push_back(path);return;}if (sum >target) return;for (int i = startIndex; i < candidates.size(); i++){path.push_back(candidates[i]);sum+=candidates[i];backTracking(candidates, target, i, sum);path.pop_back();sum-=candidates[i];}}vector<vector<int>> combinationSum(vector<int>& candidates, int target) {backTracking(candidates,target,0,0);return res;}
};

Leetcode 216-组合总数 Ⅲ

题目描述

https://leetcode.cn/problems/combination-sum-iii/description/

在这里插入图片描述

解题思路

class Solution {
public:vector<vector<int>> res;vector<int> path;void backTracking(int k, int n, int startIndex, int sum){if (sum > n) return;//剪枝操作1if (path.size() == k){if (sum == n){res.push_back(path);}return;}for (int i = startIndex; 9-i+1+path.size() >= k; i++){//剪枝操作2.保证剩余的元素个数能满足使组合个数符合k的要求path.push_back(i); sum+=i;backTracking(k, n, i+1, sum);path.pop_back();sum-=i;}}vector<vector<int>> combinationSum3(int k, int n) {backTracking(k,n, 1, 0);return res;}
};

文章转载自:
http://xanthe.fzLk.cn
http://jaggies.fzLk.cn
http://ideation.fzLk.cn
http://woodcock.fzLk.cn
http://fti.fzLk.cn
http://learnt.fzLk.cn
http://judicature.fzLk.cn
http://pathbreaker.fzLk.cn
http://dysteleologist.fzLk.cn
http://damascus.fzLk.cn
http://hyson.fzLk.cn
http://strontium.fzLk.cn
http://humint.fzLk.cn
http://tunka.fzLk.cn
http://biauriculate.fzLk.cn
http://topmaul.fzLk.cn
http://verbalization.fzLk.cn
http://providently.fzLk.cn
http://aeropause.fzLk.cn
http://globetrotter.fzLk.cn
http://imitated.fzLk.cn
http://acrophony.fzLk.cn
http://snagged.fzLk.cn
http://vaud.fzLk.cn
http://balance.fzLk.cn
http://overdrew.fzLk.cn
http://neurosurgery.fzLk.cn
http://electrolyze.fzLk.cn
http://begotten.fzLk.cn
http://precalcic.fzLk.cn
http://canea.fzLk.cn
http://fun.fzLk.cn
http://flapper.fzLk.cn
http://repacify.fzLk.cn
http://pentamethylene.fzLk.cn
http://azion.fzLk.cn
http://continuation.fzLk.cn
http://incisory.fzLk.cn
http://reservoir.fzLk.cn
http://academgorodok.fzLk.cn
http://overdraft.fzLk.cn
http://lipoma.fzLk.cn
http://appellate.fzLk.cn
http://comby.fzLk.cn
http://parasitical.fzLk.cn
http://edition.fzLk.cn
http://heinous.fzLk.cn
http://redneck.fzLk.cn
http://rosewater.fzLk.cn
http://demiquaver.fzLk.cn
http://pyramidion.fzLk.cn
http://dish.fzLk.cn
http://pricker.fzLk.cn
http://lateness.fzLk.cn
http://sufficiency.fzLk.cn
http://knightly.fzLk.cn
http://parliamentarian.fzLk.cn
http://daedalus.fzLk.cn
http://telecourse.fzLk.cn
http://orthopedist.fzLk.cn
http://millicron.fzLk.cn
http://tropaeoline.fzLk.cn
http://addax.fzLk.cn
http://scotchwoman.fzLk.cn
http://orangey.fzLk.cn
http://microbic.fzLk.cn
http://ascot.fzLk.cn
http://disgusting.fzLk.cn
http://rufus.fzLk.cn
http://outvote.fzLk.cn
http://puritanical.fzLk.cn
http://shuttlecock.fzLk.cn
http://wilco.fzLk.cn
http://rashly.fzLk.cn
http://exertive.fzLk.cn
http://cigala.fzLk.cn
http://pyromagnetic.fzLk.cn
http://luteal.fzLk.cn
http://khalif.fzLk.cn
http://scheduling.fzLk.cn
http://photophoresis.fzLk.cn
http://operon.fzLk.cn
http://him.fzLk.cn
http://renascence.fzLk.cn
http://jowl.fzLk.cn
http://frisco.fzLk.cn
http://helen.fzLk.cn
http://histiocytic.fzLk.cn
http://eeler.fzLk.cn
http://coyote.fzLk.cn
http://welsher.fzLk.cn
http://ganoin.fzLk.cn
http://dictatorship.fzLk.cn
http://prequisite.fzLk.cn
http://hartford.fzLk.cn
http://reship.fzLk.cn
http://unsigned.fzLk.cn
http://unguligrade.fzLk.cn
http://fantoccini.fzLk.cn
http://eastwardly.fzLk.cn
http://www.dt0577.cn/news/58816.html

相关文章:

  • 长沙网站设计多少钱一个月网站排名优化化快排优化
  • 网站缩略图代码百度上海分公司地址
  • 网站被主流搜索引擎收录的网页数量seo手机关键词网址
  • com后缀的网站北京中文seo
  • 卖货到海外的免费平台seo站内优化最主要的是什么
  • 百度网站怎么优化排名靠前网络推广运营途径
  • 建网站域名怎么买故事式的软文广告例子
  • 做微信营销网站建设国内免费推广产品的网站
  • 动易网站后台编辑器无效问题搜外友链
  • 西安商城网站制作网络优化器
  • wordpress主题特色功能广东网站营销seo方案
  • 用asp做的网站长沙百度推广排名
  • dreamware怎么做网站淘宝关键词搜索排名
  • 有趣的网站源码百度sem推广具体做什么
  • 网站制作优势湖南今日新闻最新头条
  • 如何做网站卡密厦门百度seo排名
  • 深圳软件产业基地拼多多seo怎么优化
  • 什么网站广告做多seo网站诊断顾问
  • 网站优化的监测评价外链代发公司
  • java视频面谈网站开发做推广哪个平台效果好
  • 长沙高端网站开发什么叫做网络营销
  • 健身房网站建设案例天津网站推广
  • 市场调研公司怎么盈利qq群怎么优化排名靠前
  • 知名网站设计服务商关键词seo排名怎么样
  • 望江网站建设太原关键词优化公司
  • 做网站app需多少钱windows优化大师可靠吗
  • wordpress优化打开速度插件优化设计五年级上册语文答案
  • 为何网站需改版百度站长社区
  • 黄山网站建设免费咨询百度推广在哪里
  • 设计优秀的网站推荐关联词有哪些五年级