Collection of my solutions to coding problems — with source code and explanation. Currently only solving on LeetCode.
Problem ID | Solution | Problem Specs |
---|---|---|
convert-number-to-words | Convert a given number to words | ⇨ |
minimize-sum-of-an-array-by-at-most-k-reductions | Minimize Sum of an Array by at Most K Reductions | ⇨ |
Problem ID | Solution | Problem Specs |
---|---|---|
BRACKETS | Brackets | ⇨ |
BROKPHON | Broken Telephone | ⇨ |
EZSPEAK | Easy Pronunciation | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 1 | Two Sum | ⇨ |
LeetCode | 13 | Roman to Integer | ⇨ |
LeetCode | 32 | Coin Change | ⇨ |
LeetCode | 35 | Search Insert Position | ⇨ |
LeetCode | 49 | Group Anagrams | ⇨ |
LeetCode | 55 | Jump Game | ⇨ |
LeetCode | 66 | Plus One | ⇨ |
LeetCode | 121 | Best Time to Buy and Sell Stock | ⇨ |
LeetCode | 122 | Best Time to Buy and Sell Stock II | ⇨ |
LeetCode | 215 | Kth Largest Element in an Array | ⇨ |
LeetCode | 217 | Contains Duplicate | ⇨ |
LeetCode | 238 | Product of Array Except Self | ⇨ |
LeetCode | 242 | Valid Anagram | ⇨ |
LeetCode | 347 | Top K Frequent Elements | ⇨ |
LeetCode | 875 | Koko Eating Bananas | ⇨ |
LeetCode | 1011 | Capacity To Ship Packages Within D Days | ⇨ |
GeeksforGeeks | convert-number-to-words | Convert a given number to words | ⇨ |
CodeChef | BRACKETS | Brackets | ⇨ |
CodeChef | BROKPHON | Broken Telephone | ⇨ |
CodeChef | EZSPEAK | Easy Pronunciation | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 3 | Longest Substring Without Repeating Characters | ⇨ |
LeetCode | 12 | Integer to Roman | ⇨ |
LeetCode | 13 | Roman to Integer | ⇨ |
LeetCode | 20 | Valid Parentheses | ⇨ |
LeetCode | 49 | Group Anagrams | ⇨ |
LeetCode | 125 | Valid Palindrome | ⇨ |
LeetCode | 242 | Valid Anagram | ⇨ |
GeeksforGeeks | convert-number-to-words | Convert a given number to words | ⇨ |
CodeChef | BRACKETS | Brackets | ⇨ |
CodeChef | EZSPEAK | Easy Pronunciation | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 1 | Two Sum | ⇨ |
LeetCode | 3 | Longest Substring Without Repeating Characters | ⇨ |
LeetCode | 12 | Integer to Roman | ⇨ |
LeetCode | 13 | Roman to Integer | ⇨ |
LeetCode | 49 | Group Anagrams | ⇨ |
LeetCode | 355 | Design Twitter | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 217 | Contains Duplicate | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 20 | Valid Parentheses | ⇨ |
LeetCode | 94 | Binary Tree Inorder Traversal | ⇨ |
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 144 | Binary Tree Preorder Traversal | ⇨ |
LeetCode | 145 | Binary Tree Postorder Traversal | ⇨ |
LeetCode | 589 | N-ary Tree Preorder Traversal | ⇨ |
LeetCode | 590 | N-ary Tree Postorder Traversal | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 102 | Binary Tree Level Order Traversal | ⇨ |
LeetCode | 111 | Minimum Depth of Binary Tree | ⇨ |
LeetCode | 429 | N-ary Tree Level Order Traversal | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 355 | Design Twitter | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 2 | Add Two Numbers | ⇨ |
LeetCode | 23 | Merge k Sorted Lists | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 23 | Merge k Sorted Lists | ⇨ |
LeetCode | 215 | Kth Largest Element in an Array | ⇨ |
LeetCode | 347 | Top K Frequent Elements | ⇨ |
LeetCode | 355 | Design Twitter | ⇨ |
GeeksforGeeks | minimize-sum-of-an-array-by-at-most-k-reductions | Minimize Sum of an Array by at Most K Reductions | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 23 | Merge k Sorted Lists | ⇨ |
LeetCode | 215 | Kth Largest Element in an Array | ⇨ |
LeetCode | 347 | Top K Frequent Elements | ⇨ |
GeeksforGeeks | minimize-sum-of-an-array-by-at-most-k-reductions | Minimize Sum of an Array by at Most K Reductions | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 94 | Binary Tree Inorder Traversal | ⇨ |
LeetCode | 100 | Same Tree | ⇨ |
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 102 | Binary Tree Level Order Traversal | ⇨ |
LeetCode | 104 | Maximum Depth of Binary Tree | ⇨ |
LeetCode | 108 | Convert Sorted Array to Binary Search Tree | ⇨ |
LeetCode | 110 | Balanced Binary Tree | ⇨ |
LeetCode | 111 | Minimum Depth of Binary Tree | ⇨ |
LeetCode | 144 | Binary Tree Preorder Traversal | ⇨ |
LeetCode | 145 | Binary Tree Postorder Traversal | ⇨ |
LeetCode | 429 | N-ary Tree Level Order Traversal | ⇨ |
LeetCode | 515 | Find Largest Value in Each Tree Row | ⇨ |
LeetCode | 559 | Maximum Depth of N-ary Tree | ⇨ |
LeetCode | 589 | N-ary Tree Preorder Traversal | ⇨ |
LeetCode | 590 | N-ary Tree Postorder Traversal | ⇨ |
LeetCode | 2331 | Evaluate Boolean Binary Tree | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 94 | Binary Tree Inorder Traversal | ⇨ |
LeetCode | 100 | Same Tree | ⇨ |
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 102 | Binary Tree Level Order Traversal | ⇨ |
LeetCode | 104 | Maximum Depth of Binary Tree | ⇨ |
LeetCode | 108 | Convert Sorted Array to Binary Search Tree | ⇨ |
LeetCode | 110 | Balanced Binary Tree | ⇨ |
LeetCode | 111 | Minimum Depth of Binary Tree | ⇨ |
LeetCode | 144 | Binary Tree Preorder Traversal | ⇨ |
LeetCode | 145 | Binary Tree Postorder Traversal | ⇨ |
LeetCode | 515 | Find Largest Value in Each Tree Row | ⇨ |
LeetCode | 2331 | Evaluate Boolean Binary Tree | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 108 | Convert Sorted Array to Binary Search Tree | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 94 | Binary Tree Inorder Traversal | ⇨ |
LeetCode | 100 | Same Tree | ⇨ |
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 104 | Maximum Depth of Binary Tree | ⇨ |
LeetCode | 110 | Balanced Binary Tree | ⇨ |
LeetCode | 111 | Minimum Depth of Binary Tree | ⇨ |
LeetCode | 144 | Binary Tree Preorder Traversal | ⇨ |
LeetCode | 145 | Binary Tree Postorder Traversal | ⇨ |
LeetCode | 559 | Maximum Depth of N-ary Tree | ⇨ |
LeetCode | 589 | N-ary Tree Preorder Traversal | ⇨ |
LeetCode | 590 | N-ary Tree Postorder Traversal | ⇨ |
LeetCode | 2331 | Evaluate Boolean Binary Tree | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 101 | Symmetric Tree | ⇨ |
LeetCode | 102 | Binary Tree Level Order Traversal | ⇨ |
LeetCode | 111 | Minimum Depth of Binary Tree | ⇨ |
LeetCode | 429 | N-ary Tree Level Order Traversal | ⇨ |
LeetCode | 515 | Find Largest Value in Each Tree Row | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 2 | Add Two Numbers | ⇨ |
LeetCode | 69 | Sqrt(x) | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 32 | Coin Change | ⇨ |
LeetCode | 55 | Jump Game | ⇨ |
LeetCode | 121 | Best Time to Buy and Sell Stock | ⇨ |
LeetCode | 122 | Best Time to Buy and Sell Stock II | ⇨ |
LeetCode | 238 | Product of Array Except Self | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 55 | Jump Game | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 35 | Search Insert Position | ⇨ |
LeetCode | 69 | Sqrt(x) | ⇨ |
LeetCode | 278 | First Bad Version | ⇨ |
LeetCode | 875 | Koko Eating Bananas | ⇨ |
LeetCode | 1011 | Capacity To Ship Packages Within D Days | ⇨ |
Platform | Problem ID | Solution | Problem Specs |
---|---|---|---|
LeetCode | 215 | Kth Largest Element in an Array | ⇨ |
LeetCode | 347 | Top K Frequent Elements | ⇨ |