zoukankan      html  css  js  c++  java
  • 未分类——数组

    554. 砖墙
    https://leetcode-cn.com/problems/brick-wall/
    939. 最小面积矩形
    https://leetcode-cn.com/problems/minimum-area-rectangle/

    73. 矩阵置零
    https://leetcode-cn.com/problems/set-matrix-zeroes/solution/
    162. 寻找峰值
    https://leetcode-cn.com/problems/find-peak-element/

    排序:
    853. 车队
    https://leetcode-cn.com/problems/car-fleet/solution/
    253. 会议室 II
    https://leetcode-cn.com/problems/meeting-rooms-ii/

    回文排列(会员)
    https://leetcode-cn.com/problems/palindrome-permutation/

    https://leetcode-cn.com/problems/k-closest-points-to-origin/submissions/
    已知设备点
    https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/submissions/

    763. 划分字母区间
    https://leetcode-cn.com/problems/partition-labels/
    86. 分隔链表
    https://leetcode-cn.com/problems/partition-list/


    71. 简化路径
    https://leetcode-cn.com/problems/simplify-path/
    1249. 移除无效的括号
    https://leetcode-cn.com/problems/minimum-remove-to-make-valid-parentheses/


    347. 前 K 个高频元素
    https://leetcode-cn.com/problems/top-k-frequent-elements/
    743. 网络延迟时间
    https://leetcode-cn.com/problems/network-delay-time/

    简单1:804. 唯一摩尔斯密码词
    https://leetcode-cn.com/problems/unique-morse-code-words/

    简单2:198. 打家劫舍
    https://leetcode-cn.com/problems/house-robber/submissions/

    中等1:1234. 替换子串得到平衡字符串
    https://leetcode-cn.com/problems/replace-the-substring-for-balanced-string/

    中等2:650. 只有两个键的键盘
    https://leetcode-cn.com/problems/2-keys-keyboard/

    中等3:130. 被围绕的区域
    https://leetcode-cn.com/problems/surrounded-regions/

    分糖果
    https://leetcode-cn.com/problems/distribute-candies-to-people/

    腐烂的橘子:(比生命游戏难)
    https://leetcode-cn.com/problems/rotting-oranges/

    扫雷游戏:
    https://leetcode-cn.com/problems/minesweeper/

    https://leetcode-cn.com/problems/masking-personal-information/
    https://leetcode-cn.com/problems/longest-palindromic-subsequence/
    https://leetcode-cn.com/problems/smallest-range/

    1、每日温度
    https://leetcode-cn.com/problems/daily-temperatures/
    2、Z字形变换
    https://leetcode-cn.com/problems/zigzag-conversion/

    2、验证栈序列
    https://leetcode-cn.com/problems/validate-stack-sequences/
    1、比较版本号
    https://leetcode-cn.com/problems/compare-version-numbers/
    2、移掉K位数字
    https://leetcode-cn.com/problems/remove-k-digits/
    1、生命游戏
    https://leetcode-cn.com/problems/game-of-life/
    2、钥匙和房间
    https://leetcode-cn.com/problems/keys-and-rooms/
    1、朋友圈:
    https://leetcode-cn.com/problems/friend-circles/
    2、两数相加:
    https://leetcode-cn.com/problems/add-two-numbers/
    1、字符串相乘
    https://leetcode-cn.com/problems/multiply-strings/
    2、螺旋矩阵
    https://leetcode-cn.com/problems/spiral-matrix/

    第一期:对象栈
    中等:
    https://leetcode-cn.com/problems/decode-string/
    https://leetcode-cn.com/problems/daily-temperatures/
    困难:
    https://leetcode-cn.com/problems/trapping-rain-water/
    https://leetcode-cn.com/problems/tag-validator/

    面试题 16.17. 连续数列
    https://leetcode-cn.com/problems/contiguous-sequence-lcci/
    面试题47. 礼物的最大价值
    https://leetcode-cn.com/problems/li-wu-de-zui-da-jie-zhi-lcof/
    638. 大礼包
    https://leetcode-cn.com/problems/shopping-offers/

    862. 和至少为 K 的最短子数组
    https://leetcode-cn.com/problems/shortest-subarray-with-sum-at-least-k/
    749. 隔离病毒
    https://leetcode-cn.com/problems/contain-virus/
    188. 买卖股票的最佳时机4
    https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iv/

    https://leetcode-cn.com/problems/find-words-that-can-be-formed-by-characters/
    https://leetcode-cn.com/problems/as-far-from-land-as-possible/
    https://leetcode-cn.com/problems/subarrays-with-k-different-integers/

    https://leetcode-cn.com/problems/masking-personal-information/
    https://leetcode-cn.com/problems/decrease-elements-to-make-array-zigzag/
    https://leetcode-cn.com/problems/maximal-rectangle/

    https://leetcode-cn.com/problems/repeated-dna-sequences
    https://leetcode-cn.com/problems/linked-list-components/
    https://leetcode-cn.com/problems/daily-temperatures/ https://leetcode-cn.com/problems/restore-ip-addresses/


    练习:
    第一期 :
    中等:
    https://leetcode-cn.com/problems/decode-string/
    https://leetcode-cn.com/problems/daily-temperatures/

    困难:
    https://leetcode-cn.com/problems/trapping-rain-water/
    https://leetcode-cn.com/problems/tag-validator/

    总结:

    1、最大子序列和

    2、最大子序列积

    思路:

    最大子序列和:在循环中判断前面元素和是否小于0,小于0则候选子序列从当前元素开始。
    最大子序列积:在循环中判断当前元素是否小于0, 小于0则将 当前元素*以前一个元素结尾的最小的子序列积 = 以当前元素结尾的最大的子序列乘积imax; 同时更新 以当前元素结尾的最小的子序列乘积iMin = 当前元素*以前一个元素结尾的最小的子序列积。

                             最后更新最大的子序列乘积 max = Math.max(max, iMax)。

  • 相关阅读:
    Mybatis动态SQL
    Mybatis05__#和$的区别
    Mybatis04__输入参数/输出参数
    数据库中的字段和实体类中的字段不一致
    Mybatis中常用注解
    Mybatis03__配置文件简介
    Mybatis实现增、删、改操作时返回主键
    Mybatis04__CURD
    Mybatis02__Mybatis搭建
    lxrunoffline的使用
  • 原文地址:https://www.cnblogs.com/sunshine1218/p/12507514.html
Copyright © 2011-2022 走看看