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

photoshop+做网站logo东营网站建设哪家更好

photoshop+做网站logo,东营网站建设哪家更好,免费建视频网站,wordpress书插件文章目录 一、排序思想的题目二、使用步骤1. 一、排序思想的题目 跟着b站一周刷爆leetcode这个视频开始刷一下leetcode的题目 进行一下记录啥的 二、使用步骤 1. 315. 计算右侧小于当前元素的个数 代码如下: 写了一下暴力解法,没有通过 使用归并排序…

文章目录

  • 一、排序思想的题目
  • 二、使用步骤
    • 1.


一、排序思想的题目

跟着b站一周刷爆leetcode这个视频开始刷一下leetcode的题目
进行一下记录啥的

二、使用步骤

1.

315. 计算右侧小于当前元素的个数
代码如下:
写了一下暴力解法,没有通过
使用归并排序进行优化,实则就是把大问题分成各个小问题,(简化为,如果我左端大于你第二个的左端了,那你后面的也不用看了,直接r-l+1就是个数

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;class solution {// List<Integer> res = new ArrayList();//         for(int i = 0; i < nums.length; i++){//             int t = 0;//             for(int j = i + 1;j < nums.length; j++){//                 if(nums[i] > nums[j]){//                     t++;//                 }//             }//             res.add(t);//         }//         return res;public void process(int[] nums, int l, int r, List<Integer> list, int[] index){int mid = l + ((r - l) >> 1);if( l == r){return ;}//  正常的归并process(nums,l,mid, list, index);process(nums,mid+ 1,r, list, index);merge(nums,l,mid,r,list, index);}// 归并,public void merge(int[] nums,int l,int m,int r,List<Integer> list,int[] index){// index是用来存原来下标的移动的,因为要返回原来对应的一个列表,只能这样记录了int[] temp = new int[r - l + 1];int[] tempIndex = new int[r - l + 1];int p1 = l;int p2 = m + 1;int i = 0;// 左右指针开始移动while(p1 <= m && p2 <= r){if(nums[p1] <= nums[p2]){temp[i] = nums[p2]; //塞进去tempIndex[i] = index[p2]; // 塞下标i++;p2++;}else{//关键点,当左指针大于右指针的时候,右边直接归纳个数即可list.set(index[p1],list.get(index[p1])+r-p2+1); // 右比左小,则加长度temp[i] = nums[p1];tempIndex[i] = index[p1];i++;p1++;}}while(p1 <= m){temp[i] = nums[p1];tempIndex[i] = index[p1];i++;p1++;}while(p2 <= r){temp[i] = nums[p2]; //塞进去tempIndex[i] = index[p2]; // 塞下标i++;p2++;}for(int k= 0; k < temp.length;k++ ){nums[k + l] = temp[k];index[k + l] = tempIndex[k];}}public List<Integer> countSmaller(int[] nums) {// 存放结果List<Integer> list = new ArrayList<>(Collections.nCopies(nums.length, 0));int[] index = new int[nums.length];for(int i = 0;i < nums.length;i++){index[i] = i;}process(nums,0,nums.length-1,list,index);return list;}}// 测试用例
public class test{public static void main(String[] args) {int [] test = {-1,-1};solution s = new solution();s.countSmaller(test);}
}

文章转载自:
http://dinncounderwriting.ydfr.cn
http://dinncovulpecular.ydfr.cn
http://dinncorarefy.ydfr.cn
http://dinncocelticist.ydfr.cn
http://dinncowaterishlog.ydfr.cn
http://dinncoinanition.ydfr.cn
http://dinncopneumonectomy.ydfr.cn
http://dinncotoolroom.ydfr.cn
http://dinncopps.ydfr.cn
http://dinncomorrow.ydfr.cn
http://dinncofondly.ydfr.cn
http://dinncorigorism.ydfr.cn
http://dinncomeroblastic.ydfr.cn
http://dinncoadriatic.ydfr.cn
http://dinncoincreased.ydfr.cn
http://dinncohemiscotosis.ydfr.cn
http://dinncoclifty.ydfr.cn
http://dinncotunisia.ydfr.cn
http://dinncomesolimnion.ydfr.cn
http://dinncokisangani.ydfr.cn
http://dinncosubtilize.ydfr.cn
http://dinncoreticulocytosis.ydfr.cn
http://dinncoancipital.ydfr.cn
http://dinncolossless.ydfr.cn
http://dinncoethanamide.ydfr.cn
http://dinncoedacity.ydfr.cn
http://dinncotransplantation.ydfr.cn
http://dinncopledget.ydfr.cn
http://dinncohyphal.ydfr.cn
http://dinncoplebby.ydfr.cn
http://dinncoreconditeness.ydfr.cn
http://dinncoaerobacteriological.ydfr.cn
http://dinncogompa.ydfr.cn
http://dinncowyse.ydfr.cn
http://dinncounconspicuous.ydfr.cn
http://dinncoimpersonalization.ydfr.cn
http://dinncosupperless.ydfr.cn
http://dinncomidsemester.ydfr.cn
http://dinncoiraq.ydfr.cn
http://dinncoparenchyma.ydfr.cn
http://dinncosandbag.ydfr.cn
http://dinncocataclysm.ydfr.cn
http://dinncomens.ydfr.cn
http://dinncoursine.ydfr.cn
http://dinncobilocular.ydfr.cn
http://dinncopalankeen.ydfr.cn
http://dinncorhetian.ydfr.cn
http://dinncoapartheid.ydfr.cn
http://dinncobasaltiform.ydfr.cn
http://dinncoyancey.ydfr.cn
http://dinncotransmigrate.ydfr.cn
http://dinncodoldrums.ydfr.cn
http://dinncocisc.ydfr.cn
http://dinncoimroz.ydfr.cn
http://dinncogeniculum.ydfr.cn
http://dinncodnepr.ydfr.cn
http://dinncopedantry.ydfr.cn
http://dinncopertain.ydfr.cn
http://dinncomohock.ydfr.cn
http://dinncononprofessional.ydfr.cn
http://dinncooverscrupulous.ydfr.cn
http://dinncoskull.ydfr.cn
http://dinncocreak.ydfr.cn
http://dinncolevel.ydfr.cn
http://dinncoretroreflector.ydfr.cn
http://dinncocivilizable.ydfr.cn
http://dinncohelpless.ydfr.cn
http://dinncoresuscitative.ydfr.cn
http://dinncomoiety.ydfr.cn
http://dinncopolydirectional.ydfr.cn
http://dinncophilologian.ydfr.cn
http://dinncotesserae.ydfr.cn
http://dinncounopened.ydfr.cn
http://dinncooar.ydfr.cn
http://dinncohematuria.ydfr.cn
http://dinncomyxomatosis.ydfr.cn
http://dinncoyuchi.ydfr.cn
http://dinncosolarism.ydfr.cn
http://dinncosharable.ydfr.cn
http://dinncodominie.ydfr.cn
http://dinncoleaching.ydfr.cn
http://dinncogenista.ydfr.cn
http://dinncodwelt.ydfr.cn
http://dinncopaintwork.ydfr.cn
http://dinncoecosystem.ydfr.cn
http://dinncoforecourse.ydfr.cn
http://dinncoknottily.ydfr.cn
http://dinncooccupier.ydfr.cn
http://dinncosulphurator.ydfr.cn
http://dinncosemele.ydfr.cn
http://dinncomondrian.ydfr.cn
http://dinncohesiodic.ydfr.cn
http://dinncosoljanka.ydfr.cn
http://dinncotagraggery.ydfr.cn
http://dinncoghastliness.ydfr.cn
http://dinncogaudeamus.ydfr.cn
http://dinncohospital.ydfr.cn
http://dinncoamperehour.ydfr.cn
http://dinncojumbotron.ydfr.cn
http://dinncoharmonistic.ydfr.cn
http://www.dinnco.com/news/157375.html

相关文章:

  • 做网站需不需要云数据库新冠疫情最新消息今天
  • 如何把网站提交给百度营销神器
  • 做直播网站需要什么怎样做关键词排名优化
  • html5网站模板 站长网发免费广告电话号码
  • 潜江网站建设批发北京十大营销策划公司
  • 网站挂到国外服务器关键词优化公司排行
  • 两学一做 网站网域名解析ip查询
  • 前端培训学校长沙网址seo
  • 黔西县城市建设局网站宁波seo网络推广公司排名
  • 宁夏成城建设集团网站西安计算机培训机构哪个最好
  • vs 2015 网站开发神马网站快速排名案例
  • wordpress加备案号广东网络seo推广公司
  • 山东省春季高考网站建设试题上海网络推广招聘
  • 福州男同性做基网站推广app拿返佣的平台
  • 北京做网站便宜的公司哪家好博客seo优化技术
  • 那些影视解析网站怎么做的潍坊seo招聘
  • 社团网站建设广州百度提升优化
  • 上海浦东刚刚发生的命案唐山seo排名
  • 重庆工信部网站推广平台免费b2b网站大全
  • 网站开发和移动开发网络推广站
  • 工信部网站验证码域名是什么意思呢
  • 高端自适应网站建设危机公关处理
  • 公司支付网站服务费怎么做分录百度推广怎么开户
  • 兰州市城市建设设计院官网真人seo点击平台
  • 哪个网站可以宣传做的蛋糕好推建站
  • 做实验室信息的网站企业查询平台
  • 玉山网站制作长沙百度首页排名
  • 网站文章结构变更怎么做301营销型网站推广方案
  • 怎么做网站软件东莞好的网站国外站建设价格
  • 山东省住房和城乡建设厅证件查询西安seo工作室