上一页 1 2 3 4 5 6 ··· 44 下一页
摘要: 问题: 给定算数字符串,求解。 其中字符串包含: 数字: '0'~'9':可构成任意n位数十进制数。 运算符号: '-':减法 '+':加法 '*':乘法(优先级高) '/':除法(优先级高) 括号: '(':优先计算括号内 ')':优先计算括号内 空格: ' ':无意义 Example 1: In 阅读全文
posted @ 2021-05-16 18:16 habibah_chang 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定一组event的举办起始日表, 可以参加任意event在任意天。 求最多能参加多少个event。 ⚠️ 注意:同一天只能参加一个event。 Example 1: Input: events = [[1,2],[2,3],[3,4]] Output: 3 Explanation: You 阅读全文
posted @ 2021-04-29 15:20 habibah_chang 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 问题: 无限横坐标中,下落正方块问题。 position[i]={x, len} 表示:每次落在坐标 x 的位置,正方块变长len。 求每次落下后,当前最高y坐标的高度。 Example 1: Input: [[1, 2], [2, 3], [6, 1]] Output: [2, 5, 5] Exp 阅读全文
posted @ 2021-04-29 13:26 habibah_chang 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 类似问题:232. Implement Queue using Stacks 问题: 设计数据结构,使用queue实现stack。 实现以下功能: void push(int x) Pushes element x to the top of the stack. int pop() Removes 阅读全文
posted @ 2021-04-18 15:15 habibah_chang 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 问题: 设计数据结构,使用stack实现queue。 实现以下功能: void push(int x) Pushes element x to the back of the queue. int pop() Removes the element from the front of the que 阅读全文
posted @ 2021-04-18 14:39 habibah_chang 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定二维数组, 求其中子矩形中元素和不大于K 的最大和。 Example 1: Input: matrix = [[1,0,1],[0,-2,3]], k = 2 Output: 2 Explanation: Because the sum of the blue rectangle [[0 阅读全文
posted @ 2021-04-17 14:59 habibah_chang 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 相关问题:496. Next Greater Element I 问题: 给定一个数组,和一个大小为k的滑动窗口, 求窗口范围内的最大值依次是多少。 Example 1: Input: nums = [1,3,-1,-3,5,3,6,7], k = 3 Output: [3,3,5,5,6,7] E 阅读全文
posted @ 2021-04-16 18:55 habibah_chang 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 相关问题:496. Next Greater Element I 问题: 给定按照日期推移的每日温度列表。 求每一天,距离下一个更暖和的日子还需要的天数。 For example, given the list of temperatures T = [73, 74, 75, 71, 69, 72, 阅读全文
posted @ 2021-04-16 16:47 habibah_chang 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 相关问题:496. Next Greater Element I 问题: 给定数组num,对于每个元素求下一个更大的元素。 下一个的定义:右边 且 若到末尾元素,循环从index=0开始继续向右。 Example 1: Input: nums = [1,2,1] Output: [2,-1,2] E 阅读全文
posted @ 2021-04-16 15:48 habibah_chang 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定数组num2, 求num1中各数右边第一个大于它的数。 Example 1: Input: nums1 = [4,1,2], nums2 = [1,3,4,2] Output: [-1,3,-1] Explanation: For number 4 in the first array, 阅读全文
posted @ 2021-04-16 15:26 habibah_chang 阅读(38) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 44 下一页