摘要: The problem of this solution can be BFS and DFS. BFS is easy to understand. The following is DFS solution: private List<Integer> res = new ArrayList<> 阅读全文
posted @ 2022-02-09 07:57 阳光明媚的菲越 阅读(20) 评论(0) 推荐(0) 编辑
摘要: The first solution, the easiest one, time complexity: O(nlog(n)) public int findKthLargest(int[] nums, int k) { Arrays.sort(nums); if(k<=nums.length) 阅读全文
posted @ 2022-02-09 07:39 阳光明媚的菲越 阅读(21) 评论(0) 推荐(0) 编辑
摘要: For this problem, we must know the sign just before the num. For example, s = "3+2*2", when we deal with the first 2, we must know '+' is just before 阅读全文
posted @ 2022-02-09 02:27 阳光明媚的菲越 阅读(18) 评论(0) 推荐(0) 编辑