I just started adding problems. Stay tuned for 10 days to get more problems. 07/31 - I'm back. I'll start working on this from now.
As a student I solved many leetcode problems but unable to identify the most efficient solution and this repo will help you with explanation.
Often careercup contains buggy code and most inefficient algorithms. I try to add an effcient one with explanation in my own words.
Feel free to add issues, comment and pull request.
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Careercup | Permutation Casewise | Java | Python | O(2^n) | O(1) | Medium | |
| Leetcode | 461. Hamming Distance | Java | Python | O(n) | O(1) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 605. Can Place Flowers | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 643. Maximum Average Subarray I | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 628. Maximum Product of Three Numbers | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 605. Can Place Flowers | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 611. Valid Triangle Number | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 561. Array Partition I | Java | Python | O(nlogn) | O(1) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 557. Reverse Words in a String III | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 387. First Unique Character in a String | Java | Python | O(n) | O(n) | Easy | |
| Leetcode | 647. Palindromic Substrings | Java | Python | O(n^2) | O(1) | Easy | |
| Leetcode | 500. Keyboard Row | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | [293. Flip Game](https://leetcode.com/problems/flip-game/description/ | Java | Python | O(n) | O(1) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 1. Two Sum | Java | Python | O(n) | O(n) | Easy | |
| Leetcode | 359. Logger Rate Limiter | Java | Python | O(n) | O(n) | Easy | |
| Leetcode | 535. Encode and Decode TinyURL | Java | Python | O(n) | O(1) | Medium | |
| Leetcode | 266. Palindrome Permutation | Java | Python | O(n) | O(1) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 653. Two Sum IV - Input is a BST | Java | Python | O(n) | O(n) | Easy | |
| Leetcode | 617. Merge Two Binary Trees | Java | Python | O(mn) | O(1) | Easy | |
| Leetcode | 637. Average of Levels in Binary Tree | Java | Python | O(n) | O(1) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 53. Maximum Sum Subarray | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 152. Maximum Product Subarray | Java | Python | O(n) | O(1) | Medium | |
| Leetcode | 628. Maximum Product of Three Numbers | Java | Python | O(n) | O(1) | Easy | |
| Leetcode | 62. Unique Paths | Java | Python | O(m*n) | O(m+n) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 654. Maximum Binary Tree | Java | Python | O(n log n) | O(n) | Easy |
| Website | Title | Solution | Time | Space | Difficulty | Note |
|---|---|---|---|---|---|---|
| Leetcode | 339. Nested List Weight Sum | Java | Python | O( ) | O( ) | Easy |