2021年8月8日
摘要: Link: https://leetcode.com/problems/reverse-linked-list/ Constraints: The number of nodes in the list is the range [0, 5000]. -5000 <= Node.val <= 500 阅读全文
posted @ 2021-08-08 10:58 blackraven25 阅读(24) 评论(0) 推荐(0) 编辑
  2021年8月7日
摘要: Link: https://leetcode.com/problems/min-stack/ Constraint: Idea We could use two stacks, one responsible for regular stack operations; the other one r 阅读全文
posted @ 2021-08-07 23:49 blackraven25 阅读(26) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/implement-stack-using-queues/ ##Code 阅读全文
posted @ 2021-08-07 23:22 blackraven25 阅读(8) 评论(0) 推荐(0) 编辑
摘要: Link: https://leetcode.com/problems/implement-queue-using-stacks/ Constaints 1 <= x <= 9 At most 100 calls will be made to push, pop, peek, and empty. 阅读全文
posted @ 2021-08-07 00:08 blackraven25 阅读(26) 评论(0) 推荐(0) 编辑
  2021年8月6日
摘要: Link: https://leetcode.com/problems/combinations/ Constraint: 1 <= n <= 20 1 <= k <= n ==> k is always valid Idea Initialize an structure to keep trac 阅读全文
posted @ 2021-08-06 23:10 blackraven25 阅读(72) 评论(0) 推荐(0) 编辑
摘要: Link: https://leetcode.com/problems/permutations-ii/ Constraint: Arrays may not be sorted May contain duplicate Return order is arbitrary Idea The dif 阅读全文
posted @ 2021-08-06 18:33 blackraven25 阅读(23) 评论(0) 推荐(0) 编辑
摘要: Constraint: 1 <= nums.length <= 6 -10 <= nums[i] <= 10 All the integers of nums are unique. Idea Search: if the size of permutation set is eaual to ar 阅读全文
posted @ 2021-08-06 00:21 blackraven25 阅读(39) 评论(0) 推荐(0) 编辑
  2021年8月5日
摘要: Link: https://leetcode.com/problems/subsets-ii/ Constaint: The array may contains duplicate. The array may not be sorted. Idea The idea is to think ab 阅读全文
posted @ 2021-08-05 02:13 blackraven25 阅读(28) 评论(0) 推荐(0) 编辑
  2021年8月4日
摘要: Problem link: https://leetcode.com/problems/subsets/ Constaint: 1 <= nums.length <= 10 -10 <= nums[i] <= 10 All the numbers of nums are unique. Idea S 阅读全文
posted @ 2021-08-04 21:35 blackraven25 阅读(23) 评论(0) 推荐(0) 编辑
摘要: Problem link: https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ constraint: n == matrix.length n == matrix[i].length ==> **count 阅读全文
posted @ 2021-08-04 20:25 blackraven25 阅读(22) 评论(0) 推荐(0) 编辑