摘要: 问题: 给定一个字符串,表示一个由+-*三种运算符组成的算式。 求给运算式任意加括号,使得计算优先顺序变化。 所得所有结果的可能。 Example 1: Input: expression = "2-1-1" Output: [0,2] Explanation: ((2-1)-1) = 0 (2-( 阅读全文
posted @ 2021-04-11 16:14 habibah_chang 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 问题: 求数组中第k大的元素。 Example 1: Input: nums = [3,2,1,5,6,4], k = 2 Output: 5 Example 2: Input: nums = [3,2,3,1,2,4,5,5,6], k = 4 Output: 4 Constraints: 1 < 阅读全文
posted @ 2021-04-11 14:36 habibah_chang 阅读(30) 评论(0) 推荐(0) 编辑