Solutions for all the leetcode questions I solved.
Runtime and memory usage is mentioned at the top of each program.
| # | Title | View Solution | LeetCode Link |
|---|---|---|---|
| 1 | Two Sum | Solution | Attempt |
| 9 | Palindrome Number | Solution | Attempt |
| 21 | Merge Two Sorted Lists | Solution | Attempt |
| 26 | Remove Duplicate from Sorted Array | Solution | Attempt |
| 27 | Remove Element | Solution | Attempt |
| 28 | Find the Index of the First Occurrence in a String | Solution | Attempt |
| 58 | Length of last word | Solution | Attempt |
| 66 | Plus One | Solution | Attempt |
| 69 | Sqrt(x) | Solution | Attempt |
| 83 | Remove duplicates from sorted list | Solution | Attempt |
| 121 | Best Time to Buy and Sell Stock | Solution | Attempt |
| 125 | Valid palindrome | Solution | Attempt |
| 141 | Linked List Cycle | Solution | Attempt |
| 160 | Intersection of Two Linked Lists | Solution | Attempt |
| 169 | Majority Element | Solution | Attempt |
| 191 | Number of 1 Bits | Solution | Attempt |
| 202 | Happy Number | Solution | Attempt |
| 206 | Reverse Linked List | Solution | Attempt |
| 217 | Contains Duplicate | Solution | Attempt |
| 219 | Contains Duplicate II | Solution | Attempt |
| 231 | Power of Two | Solution | Attempt |
| 242 | Valid Anagram | Solution | Attempt |
| 258 | Add Digits | Solution | Attempt |
| 263 | Ugly Number | Solution | Attempt |
| 268 | Missing Number | Solution | Attempt |
| 342 | Power of Four | Solution | Attempt |
| 344 | Reverse String | Solution | Attempt |
| 367 | Valid Perfect Square | Solution | Attempt |
| 412 | Fizz Buzz | Solution | Attempt |
| 441 | Arranging Coins | Solution | Attempt |
| 448 | Find All Numbers Disappeared in an Array | Solution | Attempt |
| 461 | Hamming Distance | Solution | Attempt |
| 704 | Binary Search | Solution | Attempt |
| 709 | To Lower Case | Solution | Attempt |
| 747 | Largest Number At Least Twice of Others | Solution | Attempt |
| 977 | Squares of Sorted Array | Solution | Attempt |
| 1051 | Height Checker | Solution | Attempt |
| 1089 | Duplicate Zeroes | Solution | Attempt |
| 1108 | Defanging an IP Address | Solution | Attempt |
| 1207 | Unique Number of Occurrences | Solution | Attempt |
| 1221 | Split a String in Balanced Strings | Solution | Attempt |
| 1323 | Maximum 69 Number | Solution | Attempt |
| 1394 | Find Lucky Integer in an Array | Solution | Attempt |
| 1431 | Kids With the Greatest Number of Candies | Solution | Attempt |
| 1470 | Shuffle the Array | Solution | Attempt |
| 1475 | Final Prices With a Special Discount in a Shop | Solution | Attempt |
| 1480 | Running Sum of 1d Array | Solution | Attempt |
| 1489 | XOR Operation in an Array | Solution | Attempt |
| 1512 | Number of Good Pairs | Solution | Attempt |
| 1572 | Matrix Diagonal Sum | Solution | Attempt |
| 1672 | Richest Customer Wealth | Solution | Attempt |
| 1752 | Check if Array Is Sorted and Rotated | Solution | Attempt |
| 1790 | Check if One String Swap Can Make Strings Equal | Solution | Attempt |
| 1800 | Maximum Ascending Subarray Sum | Solution | Attempt |
| 1929 | Concatenation of Array | Solution | Attempt |
| 2114 | Maximum Number of Words Found in Sentences | Solution | Attempt |
| 2220 | Minimum Bit Flips to Convert Number | Solution | Attempt |
| 2235 | Add Two Integers | Solution | Attempt |
| 2413 | Smallest Even Multiple | Solution | Attempt |
| 2469 | Convert the Temperature | Solution | Attempt |
| 2798 | Number of Employees Who Met the Target | Solution | Attempt |
| 2828 | Check if a String Is an Acronym of Words | Solution | Attempt |
| 2894 | Divisible and Non-divisible Sums Difference | Solution | Attempt |
| 3024 | Type of Triangle | Solution | Attempt |
| 3105 | Longest Strictly Increasing or Strictly Decreasing Subarray | Solution | Attempt |
| 3110 | Score of a String | Solution | Attempt |
| 3151 | Special Array I | Solution | Attempt |
| 3168 | Minimum Number of Chairs in a Waiting Room | Solution | Attempt |
| 3174 | Clear Digits | Solution | Attempt |
| 3304 | Find the K-th Character in String Game I | Solution | Attempt |
| 3330 | Find the Original Typed String I | Solution | Attempt |
| # | Title | View Solution | LeetCode Link |
|---|---|---|---|
| 2 | Add Two Numbers | Solution | Attempt |
| 7 | Reverse Integer | Solution | Attempt |
| 11 | Container With Most Water | Solution | Attempt |
| 24 | Swap Nodes in Pairs | Solution | Attempt |
| 29 | Divide Two Integers | Solution | Attempt |
| 61 | Rotate List | Solution | Attempt |
| 74 | Search a 2D Matrix | Solution | Attempt |
| 215 | Kth Largest Element in an Array | Solution | Attempt |
| 238 | Product of Array Except Self | Solution | Attempt |
| 435 | Non-overlapping Intervals | Solution | Attempt |
| 436 | Find Right Interval | Solution | Attempt |
| 986 | Interval List Intersections | Solution | Attempt |
| 1441 | Build an Array With Stack Operations | Solution | Attempt |
| 1726 | Tuple with Same Product | Solution | Attempt |
| 1910 | Remove All Occurrences of a Substring | Solution | Attempt |
| 2364 | Count Number of Bad Pairs | Solution | Attempt |
| 2938 | Separate Black and White Balls | Solution | Attempt |