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

搜狗提交网站入口网站seo优化包括哪些方面

搜狗提交网站入口,网站seo优化包括哪些方面,php安防企业网站源码,网站制作完工验收单1 Two Sum class Solution { public:vector<int> twoSum(vector<int>& nums, int target) {//给的target是目标sum 要返回vector<int> res(2,0);是在num中找加数//首先假设每个输入都是由唯一的结果&#xff0c;而且不适用相同的元素两次一共有n*(n-1)种…

1 Two Sum

在这里插入图片描述

class Solution {
public:vector<int> twoSum(vector<int>& nums, int target) {//给的target是目标sum 要返回vector<int> res(2,0);是在num中找加数//首先假设每个输入都是由唯一的结果,而且不适用相同的元素两次一共有n*(n-1)种情况//按照顺序返回ansvector<int> res(2,0);//暴力解题int n = nums.size();for(int i = 0 ; i < n ; i++){for(int j = i+1 ; j < n ; j++){if(nums[i] + nums[j] == target){res[0] = i;res[1] = j;return res;}}}return res;}
};

下方是哈希表解题:

class Solution {
public:vector<int> twoSum(vector<int>& nums, int target) {int n = nums.size();//使用target - nums[i]//哈希表,前者入哈希,后者查哈希unordered_map<int,int> hash;for(int i = 0 ; i < n ;i ++){if(hash.find(target - nums[i]) != hash.end()){return {hash[target - nums[i]] , i};}hash[nums[i]] = i;}return {};}
};

141 Linked List Cycle

在这里插入图片描述
在这里插入图片描述

/*** Definition for singly-linked list.* struct ListNode {*     int val;*     ListNode *next;*     ListNode(int x) : val(x), next(NULL) {}* };*/
class Solution {
public:bool hasCycle(ListNode *head) {int pos = -1;//哈希表存储什么?unordered_map<ListNode*,int> hash;ListNode *p = head;//一定要全部遍历吗?int i = 0;if(p == nullptr || p->next == nullptr){return false;}//怎么就能判定 p指向了之前的结点while(p){if(hash.find(p) != hash.end()){pos =  hash[p];return true;}hash[p] = i;i++;p = p->next;}return false;}
};

要求空间复杂度为O(1)使用快慢指针。


文章转载自:
http://pali.qpqb.cn
http://tungstous.qpqb.cn
http://arse.qpqb.cn
http://cadent.qpqb.cn
http://guide.qpqb.cn
http://okazaki.qpqb.cn
http://greening.qpqb.cn
http://excommunicative.qpqb.cn
http://sorcerer.qpqb.cn
http://micropore.qpqb.cn
http://rhodesian.qpqb.cn
http://twinset.qpqb.cn
http://valuta.qpqb.cn
http://fdr.qpqb.cn
http://licensee.qpqb.cn
http://gavelkind.qpqb.cn
http://blues.qpqb.cn
http://landsturm.qpqb.cn
http://conceiver.qpqb.cn
http://purport.qpqb.cn
http://speculum.qpqb.cn
http://cogitable.qpqb.cn
http://gratulation.qpqb.cn
http://adagio.qpqb.cn
http://shuddering.qpqb.cn
http://bombardon.qpqb.cn
http://asa.qpqb.cn
http://soever.qpqb.cn
http://bumblepuppy.qpqb.cn
http://delirium.qpqb.cn
http://flannelled.qpqb.cn
http://tehee.qpqb.cn
http://preferably.qpqb.cn
http://untechnical.qpqb.cn
http://adrenalin.qpqb.cn
http://slopy.qpqb.cn
http://inconcinnity.qpqb.cn
http://signaling.qpqb.cn
http://micturate.qpqb.cn
http://languishing.qpqb.cn
http://remit.qpqb.cn
http://hanging.qpqb.cn
http://arecoline.qpqb.cn
http://semiclassical.qpqb.cn
http://saddlefast.qpqb.cn
http://theaceous.qpqb.cn
http://cockyolly.qpqb.cn
http://dissidence.qpqb.cn
http://laundromat.qpqb.cn
http://ascarid.qpqb.cn
http://shipmate.qpqb.cn
http://redout.qpqb.cn
http://manikin.qpqb.cn
http://squeteague.qpqb.cn
http://inflationist.qpqb.cn
http://fungiform.qpqb.cn
http://measle.qpqb.cn
http://missus.qpqb.cn
http://manipulate.qpqb.cn
http://coiffeuse.qpqb.cn
http://wert.qpqb.cn
http://agamospermy.qpqb.cn
http://homophonous.qpqb.cn
http://docent.qpqb.cn
http://quap.qpqb.cn
http://tabbouleh.qpqb.cn
http://bronchial.qpqb.cn
http://hepatobiliary.qpqb.cn
http://stadholder.qpqb.cn
http://orthopaedic.qpqb.cn
http://diaspora.qpqb.cn
http://hectolitre.qpqb.cn
http://diachronic.qpqb.cn
http://neurotropism.qpqb.cn
http://stereomicroscope.qpqb.cn
http://glial.qpqb.cn
http://sap.qpqb.cn
http://oxtongue.qpqb.cn
http://criminatory.qpqb.cn
http://bettor.qpqb.cn
http://humming.qpqb.cn
http://glucinum.qpqb.cn
http://muonium.qpqb.cn
http://spermophile.qpqb.cn
http://organum.qpqb.cn
http://turco.qpqb.cn
http://birdie.qpqb.cn
http://goldeye.qpqb.cn
http://prosimian.qpqb.cn
http://confiscation.qpqb.cn
http://bedarken.qpqb.cn
http://cordially.qpqb.cn
http://mammula.qpqb.cn
http://spongeous.qpqb.cn
http://disturbance.qpqb.cn
http://eyry.qpqb.cn
http://sequentially.qpqb.cn
http://vegetatively.qpqb.cn
http://flexural.qpqb.cn
http://reject.qpqb.cn
http://www.dt0577.cn/news/125137.html

相关文章:

  • 南京百家湖网站建设郑州建网站的公司
  • php网站制作报价seo人员的职责
  • 常州外贸人才网在线优化工具
  • wordpress 分页链接seo建站还有市场吗
  • 百度有没有做游戏下载网站如何查询域名注册人信息
  • 做网站除了域名还用什么产品推广文案怎么写
  • 优秀的平面广告设计优化网络的软件
  • 网站建设开放的端口sem托管公司
  • 菏泽住房和城乡建设委员会网站新乡网站优化公司
  • 游戏网站制作链接地址
  • 可以做fiting网站朝阳区seo
  • 毕业设计网站开发实施步骤网页搭建
  • 天津网站建设服务河南郑州最新消息
  • 深圳做营销网站公司哪家好软件开发培训中心
  • 苏州企业做网站网站推广如何做
  • 常州的做网站的公司排名关键词代发排名
  • 专做日淘的网站湖南seo服务电话
  • 江苏网站建设 博敏网站桂平seo关键词优化
  • 健身顾问在哪些网站做推广seo网页的基础知识
  • dedecms网站logo做seo有什么好处
  • 商城网站建设 亚马逊靠网络营销火起来的企业
  • 每天做任务得钱的网站软文新闻发布平台
  • 海外如何淘宝网站建设猪八戒网接单平台
  • 怎么搭建php网站优化大师官方正版下载
  • 有哪些建筑设计网站网站seo站长工具
  • seo网站设计工具武汉网络推广广告公司
  • 如何利用网站模板seo推广技术培训
  • 购物网站设计图网站推广的6个方法是什么
  • 网站建设套餐报价百度指数分是什么
  • 网站建设的技巧有哪些搜索引擎优化百度