| # | Title | Solution | My Approach | Time Complexity | Space Complexity | My Ratings |
|---|---|---|---|---|---|---|
| 1 | Pick from both sides! | Java | O(n) | O(1) | 3.5 | |
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach | Time Complexity | My Ratings |
|---|---|---|---|---|---|
| # | Title | Solution | My Approach |
|---|---|---|---|
| 1 | Spiral Matrix | 1. Take Index for start and end of row and column 2. On Traversing a row/Col remove it and decrease or Increase start and End of Corresponding row/Column |
|
| 2 | Prime Sum | ||
| 3 | Largest Coprime Divisor | ||
| 4 | Min XOR value | ||
| 5 | Allocate Books | ||
| 6 | Kth Node From Middle | ||
| 7 | Balanced Parantheses! | ||
| 8 | Even Reverse | ||
| 9 | First non-repeating character in a stream of characters | ||
| 10 | Redundant Braces | ||
| 11 | Reverse Alternate K Nodes | ||
| 12 | K reverse linked list | ||
| 13 | 2-sum | 1. Since index1< index 2 required we can start from left and break at the first occurence of answer 2. If not store in hashMap current value and index of relative index for present. First answer gives lowest index |
|
| 14 | MAXSPPROD | ||
| 15 | Diffk | 1. Since K>=0 two case arise mod(A-B)= k 2. hence two scenarios are A = B+k && A =B-k 3. Put is ArrayList and check for above two cases presence. |
|
| 16 | Maximal String | 1. Two case arise for next index > current then swap 897 -- 987 2. When next index <= current then do not swap, but B swaps still available for remaining 987/997 --> 987/997 3. Use Backtracking to solve this |
|
| 17 | Pairs With Given Xor | ||
| 18 | Two out of Three | ||
| 19 | Subarray With Given Xor | ||
| 20 | Subarray with B odd numbers | ||
| 21 | Equal | ||
| 22 | Colorful Number | ||
| 23 | An Increment Problem | ||
| 24 | Longest Substring Without Repeat | ||
| 25 | Inorder Traversal | ||
| 26 | Invert the Binary Tree | ||
| 27 | Reverse Level Order | ||
| 28 | Merge K sorted arrays! | ||
| 29 | Check Palindrome | ||
| 30 | Majority Element | ||
| 31 | Profit Maximisation | ||
| 32 | Valid BST from Preorder |
| # | Title | Solution | My Approach |
|---|---|---|---|
| 33 | Assign Mice To Holes | ||
| 34 | Maximum Edge Removal | Try Again | |
| 35 | Distribute Candy | ||
| 36 | Remove Half Nodes | ||
| 37 | Longest Common Subsequence | ||
| 38 | Longest Palindromic Subsequence | ||
| 39 | Chain of Min Sum Path in MatrixPairs | ||
| 40 | Populate Next Right Pointers Tree | ||
| 41 | Maximum Size Square Sub-matrix | ||
| 42 | Min Sum Path in Triangle | ||
| 43 | Min Sum Path in Matrix | ||
| 44 | Egg Drop Problem! | ||
| 45 | Count Permutations of BST | (Again) | |
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () | ||
| 41 | () |