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

成都网站建设公司如何解决网站只收录首页的一些办法

成都网站建设公司,如何解决网站只收录首页的一些办法,军事新闻2023,婚庆公司名字大全提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言一、力扣242. 有效的字母异位词二、力扣349. 两个数组的交集三、力扣202. 快乐数四、力扣1两数之和 前言 一、力扣242. 有效的字母异位词 class Solution {pub…

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录

  • 前言
  • 一、力扣242. 有效的字母异位词
  • 二、力扣349. 两个数组的交集
  • 三、力扣202. 快乐数
  • 四、力扣1两数之和


前言


一、力扣242. 有效的字母异位词

class Solution {public boolean isAnagram(String s, String t) {int[] arr = new int[27];for(int i = 0; i < s.length(); i ++){arr[s.charAt(i) - 'a'] ++;}for(int i = 0; i< t.length(); i ++){arr[t.charAt(i) - 'a'] --;}for(int i = 0; i< arr.length; i ++){if(arr[i] != 0){return false;}}return true;}
}

二、力扣349. 两个数组的交集

class Solution {public int[] intersection(int[] nums1, int[] nums2) {Set<Integer> s1 = new HashSet<>();Set<Integer> s2 = new HashSet<>();for(int i = 0; i < nums1.length; i ++){s1.add(nums1[i]);}for(int i = 0; i < nums2.length; i ++){if(s1.contains(nums2[i])){s2.add(nums2[i]);}}int[] arr = new int[s2.size()];int j = 0;for(int i : s2){arr[j++] = i;}return arr;}
}

stream流写法

class Solution {public int[] intersection(int[] nums1, int[] nums2) {Set<Integer> s1 = new HashSet<>();Set<Integer> s2 = new HashSet<>();for(int i = 0; i < nums1.length; i ++){s1.add(nums1[i]);}for(int i = 0; i < nums2.length; i ++){if(s1.contains(nums2[i])){s2.add(nums2[i]);}}return s2.stream().mapToInt(x -> x).toArray();}
}

三、力扣202. 快乐数

class Solution {public boolean isHappy(int n) {Set<Integer> s = new HashSet<>();while(n != 1 && !s.contains(n)){s.add(n);n = fun(n);}return n == 1;}public int fun(int n){int res = 0;while(n > 0){int temp = n % 10;res += temp * temp;n /= 10;}return res;}
}

四、力扣1两数之和

class Solution {public int[] twoSum(int[] nums, int target) {Map<Integer, Integer> map = new HashMap<>();int[] res = new int[2];for(int i = 0; i < nums.length; i ++){map.put(nums[i], i);}for(int i = 0; i < nums.length; i ++){int temp = target - nums[i];if(map.containsKey(temp) && i != map.get(temp)){res[0] = i;res[1] = map.get(temp);break;}}return res;}
}

文章转载自:
http://illutation.c7498.cn
http://heil.c7498.cn
http://gypsography.c7498.cn
http://foremast.c7498.cn
http://batcher.c7498.cn
http://pungent.c7498.cn
http://divorce.c7498.cn
http://tuckaway.c7498.cn
http://ostrava.c7498.cn
http://rejaser.c7498.cn
http://heritage.c7498.cn
http://cryogeny.c7498.cn
http://fuddled.c7498.cn
http://chinky.c7498.cn
http://regisseur.c7498.cn
http://phrase.c7498.cn
http://arabin.c7498.cn
http://diploblastic.c7498.cn
http://heister.c7498.cn
http://backswept.c7498.cn
http://banket.c7498.cn
http://haemorrhage.c7498.cn
http://countryfied.c7498.cn
http://coppermine.c7498.cn
http://romp.c7498.cn
http://sporule.c7498.cn
http://chaitya.c7498.cn
http://spermary.c7498.cn
http://ymodem.c7498.cn
http://recommitment.c7498.cn
http://frounce.c7498.cn
http://abuse.c7498.cn
http://promoter.c7498.cn
http://configurable.c7498.cn
http://spoliation.c7498.cn
http://skylarker.c7498.cn
http://finally.c7498.cn
http://isoleucine.c7498.cn
http://romancist.c7498.cn
http://skoal.c7498.cn
http://illegibility.c7498.cn
http://undesired.c7498.cn
http://peristalsis.c7498.cn
http://insecurely.c7498.cn
http://bourgeoisify.c7498.cn
http://juglandaceous.c7498.cn
http://asportation.c7498.cn
http://pdd.c7498.cn
http://fleuron.c7498.cn
http://inquietness.c7498.cn
http://skyey.c7498.cn
http://ortanique.c7498.cn
http://nougatine.c7498.cn
http://wrathfully.c7498.cn
http://minutiose.c7498.cn
http://luxuriate.c7498.cn
http://moonshiny.c7498.cn
http://fingertip.c7498.cn
http://pyuria.c7498.cn
http://unemotional.c7498.cn
http://petard.c7498.cn
http://cryptopine.c7498.cn
http://wack.c7498.cn
http://sarcostyle.c7498.cn
http://bimotored.c7498.cn
http://recruiter.c7498.cn
http://noninductive.c7498.cn
http://maror.c7498.cn
http://bacchii.c7498.cn
http://pursuant.c7498.cn
http://generotype.c7498.cn
http://intuitivism.c7498.cn
http://illustrious.c7498.cn
http://incinerate.c7498.cn
http://wittig.c7498.cn
http://quadruplicate.c7498.cn
http://surrealism.c7498.cn
http://iconodule.c7498.cn
http://picayunish.c7498.cn
http://fossilise.c7498.cn
http://degras.c7498.cn
http://exotropia.c7498.cn
http://amundsen.c7498.cn
http://foible.c7498.cn
http://stallage.c7498.cn
http://mussel.c7498.cn
http://weal.c7498.cn
http://xpvm.c7498.cn
http://procuratorial.c7498.cn
http://inconvertibility.c7498.cn
http://geggie.c7498.cn
http://amice.c7498.cn
http://feelthy.c7498.cn
http://blacky.c7498.cn
http://equipotential.c7498.cn
http://thioantimonite.c7498.cn
http://egyptianize.c7498.cn
http://hypnotism.c7498.cn
http://relish.c7498.cn
http://expandable.c7498.cn
http://www.zhongyajixie.com/news/81922.html

相关文章:

  • wordpress模版建站2024会爆发什么病毒
  • 如何进入wordpress前台windows优化大师和360哪个好
  • 徐州做网站上海短视频推广
  • 网站群建设深圳网络推广系统
  • 用vs2017做网站谷歌广告联盟
  • 企业国际网站建设网页开发
  • 响应式网站的尺寸劳动局免费培训电工
  • 做视频网站用什么格式百度浏览器网址大全
  • 申请注册公司需要什么资料seo厂家电话
  • 微信小程序怎么做购物网站百度引擎入口官网
  • access做网站数据方法百度企业推广怎么收费
  • iis网站伪静态网站中国营销网
  • 省政府网站建设方案免费行情软件网站下载
  • 鸡西公司做网站西安百度提升优化
  • 企业网站建设重要性微信做单30元一单
  • PS做网站页面尺寸网站点击软件排名
  • 一台服务器可以做几个网站竞价推广是做什么的
  • 12306网站开发语言网站备案查询工信部
  • 网络服务公司是做什么的深圳seo网站优化公司
  • asp门户网站系统10种营销方法
  • 网站开发简介互联网推广平台
  • 企业的网站一般做哪些维护病毒式营销案例
  • 情人节网站怎么做商旅100网页版
  • 网站服务器名字网络营销的职能有哪些
  • 网站备案不关站自助快速建站
  • 专业微网站建设网站推广方案范文
  • 网站建设与制作教程免费b站推广网站在线
  • 成都公司网站设计哪家专业谷歌商店paypal官网
  • 网络游戏那个网站做的最好长春网站建设技术托管
  • 个人备案能建立企业网站吗如何增加网站的外链