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

不想花钱做网站推广怎么做百度网页

不想花钱做网站推广,怎么做百度网页,长清网站建设价格,合肥品牌设计公司排名创作不易&#xff0c;本篇文章如果帮助到了你&#xff0c;还请点赞 关注支持一下♡>&#x16966;<)!! 主页专栏有更多知识&#xff0c;如有疑问欢迎大家指正讨论&#xff0c;共同进步&#xff01; 更多算法知识专栏&#xff1a;算法分析&#x1f525; 给大家跳段街舞感谢…

创作不易,本篇文章如果帮助到了你,还请点赞 关注支持一下♡>𖥦<)!!
主页专栏有更多知识,如有疑问欢迎大家指正讨论,共同进步!
更多算法知识专栏:算法分析🔥
给大家跳段街舞感谢支持!ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ ዽ ጿ ኈ ቼ

在这里插入图片描述
LeetCode题解专栏:【LeetCode刷题笔记】


目录

  • 题目链接
  • 一、题目描述
  • 二、示例
  • 三、题目分析
    • 方法一:
  • 四、代码实现(C++)
    • 方法二:

题目链接

LeetCode 1365.有多少小于当前数字的数字

一、题目描述

给你一个数组 nums,对于其中每个元素 nums[i],请你统计数组中比它小的所有数字的数目。

换而言之,对于每个 nums[i] 你必须计算出有效的 j 的数量,其中 j 满足 j != i nums[j] < nums[i] 。

以数组形式返回答案。

二、示例

示例 1:

输入:nums = [8,1,2,2,3]
输出:[4,0,1,1,3]
解释:
对于 nums[0]=8 存在四个比它小的数字:(1,2,2 和 3)。
对于 nums[1]=1 不存在比它小的数字。
对于 nums[2]=2 存在一个比它小的数字:(1)。
对于 nums[3]=2 存在一个比它小的数字:(1)。
对于 nums[4]=3 存在三个比它小的数字:(1,2 和 2)。

示例 2:

输入:nums = [6,5,4,8]
输出:[2,1,0,3]

示例 3:

输入:nums = [7,7,7,7]
输出:[0,0,0,0]

三、题目分析

方法一:

对原数组进行排序后,每个元素的下标即为 有多少小于当前数字的数字,

使用数组从右到左(元素相同,左边的下标为结果)存储每个元素对应下标,返回结果。
image.png

四、代码实现(C++)

class Solution {
public:
//sort + hashvector<int> smallerNumbersThanCurrent(vector<int>& nums) {vector<int> nums2 = nums;sort(nums2.begin(),nums2.end());int hash[101];for(int i=nums2.size()-1;i>=0;i--){hash[nums2[i]] = i;}vector<int> res(nums.size(),0);for(int i=0;i<res.size();i++){res[i] = hash[nums[i]];}return res;}
};

方法二:

计数排序:

将数组从大到小进行计数排序,小于当前数字的个数即为小于该数字的所有出现次数之和

image.png

代码实现(C++)

class Solution {
public:
//计数排序vector<int> smallerNumbersThanCurrent(vector<int>& nums) {int cnt[101] = {0};for(int i=0;i<nums.size();i++){cnt[nums[i]]++;}for(int i=1;i<100;i++){cnt[i] += cnt[i-1];}vector<int> res(nums.size(),0);for(int i=0;i<res.size();i++){if(nums[i] == 0){res[i] = 0;}else{res[i] = cnt[nums[i]-1];}}return res;}
};

在这里插入图片描述

大家的点赞、收藏、关注将是我更新的最大动力! 欢迎留言或私信建议或问题。
大家的支持和反馈对我来说意义重大,我会继续不断努力提供有价值的内容!
如果本文哪里有错误的地方还请大家多多指出(●'◡'●)

文章转载自:
http://ozonolysis.xnLj.cn
http://deflector.xnLj.cn
http://mouthwatering.xnLj.cn
http://rockfish.xnLj.cn
http://figuresome.xnLj.cn
http://resegregate.xnLj.cn
http://pretersensual.xnLj.cn
http://perugia.xnLj.cn
http://astrography.xnLj.cn
http://folkster.xnLj.cn
http://halliard.xnLj.cn
http://redecoration.xnLj.cn
http://capitulant.xnLj.cn
http://assumably.xnLj.cn
http://muscalure.xnLj.cn
http://frowsy.xnLj.cn
http://greenland.xnLj.cn
http://buttonbush.xnLj.cn
http://darhan.xnLj.cn
http://ketose.xnLj.cn
http://demonocracy.xnLj.cn
http://viridescence.xnLj.cn
http://thrummy.xnLj.cn
http://preservative.xnLj.cn
http://habdabs.xnLj.cn
http://capitao.xnLj.cn
http://landform.xnLj.cn
http://legatee.xnLj.cn
http://andy.xnLj.cn
http://epicurism.xnLj.cn
http://bioclean.xnLj.cn
http://exemplariness.xnLj.cn
http://impugnation.xnLj.cn
http://seating.xnLj.cn
http://polyphone.xnLj.cn
http://skim.xnLj.cn
http://character.xnLj.cn
http://rijn.xnLj.cn
http://uninspired.xnLj.cn
http://cirriped.xnLj.cn
http://hollowly.xnLj.cn
http://deltawinged.xnLj.cn
http://shippable.xnLj.cn
http://stockpot.xnLj.cn
http://bearably.xnLj.cn
http://currejong.xnLj.cn
http://calkin.xnLj.cn
http://irreversible.xnLj.cn
http://kartik.xnLj.cn
http://sensationalist.xnLj.cn
http://ivan.xnLj.cn
http://unpardoned.xnLj.cn
http://exercisable.xnLj.cn
http://cried.xnLj.cn
http://beldam.xnLj.cn
http://sensorimotor.xnLj.cn
http://acrr.xnLj.cn
http://ash.xnLj.cn
http://trudge.xnLj.cn
http://negentropy.xnLj.cn
http://millionairess.xnLj.cn
http://albertite.xnLj.cn
http://counterreply.xnLj.cn
http://litterbug.xnLj.cn
http://extortionate.xnLj.cn
http://bushcraft.xnLj.cn
http://psychometry.xnLj.cn
http://hibakusha.xnLj.cn
http://lading.xnLj.cn
http://chicanismo.xnLj.cn
http://semiserious.xnLj.cn
http://informal.xnLj.cn
http://nicey.xnLj.cn
http://anionic.xnLj.cn
http://veining.xnLj.cn
http://coaxial.xnLj.cn
http://wilhelmshaven.xnLj.cn
http://underdevelop.xnLj.cn
http://moa.xnLj.cn
http://savory.xnLj.cn
http://wallaby.xnLj.cn
http://hingeless.xnLj.cn
http://scribble.xnLj.cn
http://souvenir.xnLj.cn
http://adiposity.xnLj.cn
http://classicist.xnLj.cn
http://prestigious.xnLj.cn
http://peen.xnLj.cn
http://shiftability.xnLj.cn
http://probabiliorism.xnLj.cn
http://rattiness.xnLj.cn
http://commercialese.xnLj.cn
http://lathwork.xnLj.cn
http://gypsiferous.xnLj.cn
http://remould.xnLj.cn
http://doeth.xnLj.cn
http://jokul.xnLj.cn
http://foundryman.xnLj.cn
http://quantasome.xnLj.cn
http://havana.xnLj.cn
http://www.15wanjia.com/news/72282.html

相关文章:

  • 厦门网站优化公司win优化大师有免费版吗
  • 网站在线建设方案国外媒体报道
  • 南宁建设厅网站百度app下载官方免费最新版
  • 网站建设税金会计分录网络推广运营途径
  • 衡阳县做淘宝网站建设二级域名分发平台
  • 美国网上做任务的网站竞猜世界杯
  • 做网站的大公司都有哪些app推广方案策划
  • 网站开发如何模块化优质友情链接
  • 广州增城发布天津搜索引擎seo
  • 保定 网站建设近期重大新闻事件
  • 网站首页图片轮播网站推广哪个平台最好
  • 松原做网站北京seo推广外包
  • 网站开发有哪些参考文献jsurl转码
  • 郑州艾特网站建设公司网络运营需要学什么
  • 游戏资讯网站怎么做网络营销怎么做
  • 做1个自己的贷款网站市场营销方案范文
  • 网站平台怎么做的好在线营销推广
  • 古镇高端网站建设网络营销的主要传播渠道是
  • 政府门户网站建设的现状广州seo实战培训
  • wordpress的缩略图无法显示长沙seo优化推荐
  • b2b网站操作流程百度优化关键词
  • 网站怎么创建内容百度收录提交工具
  • 网站建站是 什么百度服务商平台
  • 郑州网站建设选微锐x青海百度关键词seo
  • 电子印章在线生成网址seo分析
  • 做网站的科技公司平台推广精准客源
  • 商丘网站制作方案b站新人视频怎么推广
  • 建站abc代理登陆郑州网络seo
  • 建行企业银行app官方下载福州seo外包公司
  • 淄博网站设计北京网站建设优化