Solutions that are straightforward and share roughly the same time and space complexity as the best solutions. They also come with the thought processes.
For the best solutions, refer to the open source project leetcode by doocs on GitHub. You may also refer to NeetCode for a roadmap and Grind75 for guidance on learning LeetCode smoothly.
-
(1) Array
- [Easy] 605. Can Place Flowers || TC / SC = O(n) / O(1)
- [Medium] 525. Contiguous Array || TC / SC = O(n) / O(n)
- [Medium] 2895. Minimum Processing Time || TC / SC = O(NlogN) / O(logN)
- [Easy] 3010. Divide an Array Into Subarrays With Minimum Cost I || TC / SC = O(NlogN) / O(N)
-
(2) Linked List
- [Easy] 234. Palindrome Linked List || O(n) / O(1)
-
(3) DP (Dynamic Programming)
- [Medium] Flower Bouquets || (Not on LeetCode!) Link || TC / SC = O(n) / O(n)