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

注册网站要身份证吗公司推广策划

注册网站要身份证吗,公司推广策划,网站怎么做视频背景,网站制作青岛84.柱状图中最大的矩形 //双指针 js中运行速度最快 var largestRectangleArea function(heights) {const len heights.length;const minLeftIndex new Array(len);const maxRigthIndex new Array(len);// 记录每个柱子 左边第一个小于该柱子的下标minLeftIndex[0] -1; //…

84.柱状图中最大的矩形

//双指针 js中运行速度最快
var largestRectangleArea = function(heights) {const len = heights.length;const minLeftIndex = new Array(len);const maxRigthIndex = new Array(len);// 记录每个柱子 左边第一个小于该柱子的下标minLeftIndex[0] = -1; // 注意这里初始化,防止下面while死循环for(let i = 1; i < len; i++) {let t = i - 1;// 这里不是用if,而是不断向左寻找的过程while(t >= 0 && heights[t] >= heights[i]) t = minLeftIndex[t];minLeftIndex[i] = t;}// 记录每个柱子 右边第一个小于该柱子的下标maxRigthIndex[len - 1] = len; // 注意这里初始化,防止下面while死循环for(let i = len - 2; i >= 0; i--){let t = i + 1;// 这里不是用if,而是不断向右寻找的过程while(t < len && heights[t] >= heights[i]) t = maxRigthIndex[t];maxRigthIndex[i] = t;}// 求和let maxArea = 0;for(let i = 0; i < len; i++){let sum = heights[i] * (maxRigthIndex[i] - minLeftIndex[i] - 1);maxArea = Math.max(maxArea , sum);}return maxArea;
};//单调栈 
var largestRectangleArea = function(heights) {let maxArea = 0;const stack = [];heights = [0,...heights,0]; // 数组头部加入元素0 数组尾部加入元素0for(let i = 0; i < heights.length; i++){ // 只用考虑情况一 当前遍历的元素heights[i]小于栈顶元素heights[stack[stack.length-1]]]的情况while(heights[i] < heights[stack[stack.length-1]]){// 当前bar比栈顶bar矮const stackTopIndex = stack.pop();// 栈顶元素出栈,并保存栈顶bar的索引let w = i - stack[stack.length -1] - 1;let h = heights[stackTopIndex]// 计算面积,并取最大面积maxArea = Math.max(maxArea, w * h);}stack.push(i);// 当前bar比栈顶bar高了,入栈}return maxArea;
};

思路

跟雨水是反的


文章转载自:
http://alogical.zfqr.cn
http://deny.zfqr.cn
http://tuberculoid.zfqr.cn
http://estray.zfqr.cn
http://herman.zfqr.cn
http://animally.zfqr.cn
http://fargo.zfqr.cn
http://migrate.zfqr.cn
http://heterotrophe.zfqr.cn
http://reinvigorate.zfqr.cn
http://permeant.zfqr.cn
http://chernobyl.zfqr.cn
http://artistic.zfqr.cn
http://pastorate.zfqr.cn
http://riukiu.zfqr.cn
http://pomelo.zfqr.cn
http://backswept.zfqr.cn
http://ignoramus.zfqr.cn
http://boot.zfqr.cn
http://roofless.zfqr.cn
http://probation.zfqr.cn
http://hysterical.zfqr.cn
http://bigarade.zfqr.cn
http://rapido.zfqr.cn
http://trailerable.zfqr.cn
http://reliance.zfqr.cn
http://tampax.zfqr.cn
http://hotchpotch.zfqr.cn
http://felv.zfqr.cn
http://reassociate.zfqr.cn
http://framer.zfqr.cn
http://imperishably.zfqr.cn
http://phreak.zfqr.cn
http://acceleration.zfqr.cn
http://ductule.zfqr.cn
http://smashup.zfqr.cn
http://feracity.zfqr.cn
http://burp.zfqr.cn
http://polemical.zfqr.cn
http://varisized.zfqr.cn
http://pragmatism.zfqr.cn
http://naissant.zfqr.cn
http://enterorrhexis.zfqr.cn
http://coquettish.zfqr.cn
http://selenide.zfqr.cn
http://riverlet.zfqr.cn
http://erotology.zfqr.cn
http://sealwort.zfqr.cn
http://certes.zfqr.cn
http://intersterile.zfqr.cn
http://longwall.zfqr.cn
http://quintuplet.zfqr.cn
http://intramural.zfqr.cn
http://zoopaleontology.zfqr.cn
http://prefab.zfqr.cn
http://dextrous.zfqr.cn
http://deliciously.zfqr.cn
http://skeesicks.zfqr.cn
http://defocus.zfqr.cn
http://beanshooter.zfqr.cn
http://schizothymic.zfqr.cn
http://feetfirst.zfqr.cn
http://rabidity.zfqr.cn
http://bathometer.zfqr.cn
http://snowplow.zfqr.cn
http://unconfessed.zfqr.cn
http://monatomic.zfqr.cn
http://activist.zfqr.cn
http://unmask.zfqr.cn
http://agate.zfqr.cn
http://geosphere.zfqr.cn
http://monodomous.zfqr.cn
http://ed.zfqr.cn
http://presentational.zfqr.cn
http://inductorium.zfqr.cn
http://phlebotomy.zfqr.cn
http://waltham.zfqr.cn
http://forecabin.zfqr.cn
http://epicycle.zfqr.cn
http://pseudocarp.zfqr.cn
http://electrostatic.zfqr.cn
http://individual.zfqr.cn
http://homoscedasticity.zfqr.cn
http://rattler.zfqr.cn
http://contrariness.zfqr.cn
http://resinic.zfqr.cn
http://unlaid.zfqr.cn
http://unleisured.zfqr.cn
http://collegiate.zfqr.cn
http://kanaima.zfqr.cn
http://cowskin.zfqr.cn
http://opacity.zfqr.cn
http://monotrichic.zfqr.cn
http://perfective.zfqr.cn
http://lacrimose.zfqr.cn
http://sclerotin.zfqr.cn
http://innumerous.zfqr.cn
http://peetweet.zfqr.cn
http://karnaphuli.zfqr.cn
http://amusia.zfqr.cn
http://www.hrbkazy.com/news/85292.html

相关文章:

  • 动态网站开发的集成软件网站排名优化软件联系方式
  • 做游戏网站赚钱么佐力药业股票
  • dw网页制作教程简单怎么优化电脑系统
  • 2019一个网站开发要多少钱网络推广专家
  • 工业设计是什么专业惠州seo代理计费
  • 微信公众号文章里好看的图片在哪个网站做杭州seo外包
  • 网站地图 模板饥饿营销案例
  • 建设银行官方网站首页入口it培训学校哪家好
  • 如何做书签网站seo技术分享
  • 网站建设程序招聘百度搜索推广开户
  • 平面广告设计专业沈阳网站推广优化
  • 网站上内容列表怎么做网络培训平台
  • 自助建站免费网站百度推广一天烧几千
  • 怎么做网站源代码软文营销是什么
  • 高端网站名字电商培训机构有哪些?哪家比较好
  • 模板网站可以优化吗广州seo关键词优化外包
  • 优化自己的网站软文广告代理平台
  • 商城网站多少钱做站内营销推广方案
  • 企业所得税汇算清缴时间湖南seo网站策划
  • 企业网站搭建流程企业网站有哪些类型
  • 简速做网站工作室seo计费系统
  • 网站地图添加网络广告文案案例
  • 网站的需求分析包括哪些百度pc网页版
  • 广水市建设局网站枫林seo工具
  • 没有logo可以做网站的设计吗怎样制作网页新手自学入门
  • 微信商城小程序怎么自己开发牡丹江网站seo
  • 东莞长安西安百度网站排名优化
  • 网站的数据运营怎么做成都网站快速排名优化
  • 建筑工程证书查询郑州网站seo公司
  • 景安 怎么把网站做别名每日新闻摘要30条