This repo is a collection of leetcode solution proofs. Many online articles give a basic idea of why leetcode solutions work. But sometimes, we need more than just a basic idea. Proofs can help us understand better. However, detailed formal proofs can be hard to follow and might slow us down. So we try to find a middle way. We won't give super detailed proofs, but we'll help you understand both the 'why' and the 'how' of each solution in a clearer way hopefully.
Please submit an issue if you want to see proof of a particular problem that is not in this repo yet.
- 53. Maximum Subarray (DP, prefix sum)
- 1186. Maximum Subarray Sum with One Deletion (DP, prefix sum)
- 713. Subarray Product Less Than K (prefix sum, binary search, two pointers)
- 516. Longest Palindromic Subsequence (DP)
- 1216. Valid Palindrome III (DP)
- 1060. Missing Element in Sorted Array (binary search)