Solutions to every question in the 30 Day LeetCoding challenge
Hi guys!
Lockdown gave me ample time to get started with solving some question on Leetcode.
I have started with the 30 day Leetcode challenge.
As an exercise, I am also uploading the solutions to these questions (best to my knowledge).
Go ahead, take a look!
-
Single Number
Leetcode URL
Solution -
Happy Number
Leetcode URL
Solution -
Maximum Subarray
Leetcode URL
Solution -
Move Zeroes
Leetcode URL
Solution -
Best Time to Buy and Sell Stock II
Leetcode URL
Solution -
Group Anagrams
Leetcode URL
Solution -
Counting Elements
Leetcode URL
Solution
-
Middle of the Linked List
Leetcode URL
Solution -
Backspace String Compare
Leetcode URL
Solution -
Min Stack
Leetcode URL
Solution | 1 vector approach
Solution | 2 stack approach -
Diameter of Binary Tree
Leetcode URL
Solution -
Last Stone Weight
Leetcode URL
Solution -
Contiguous Array
Leetcode URL
Solution -
Perform String Shifts
Leetcode URL
Solution
-
Product of Array Except Self
Leetcode URL
Solution -
Valid Parenthesis String
Leetcode URL
Solution -
Number of Islands
Leetcode URL
Solution -
Minimum Path Sum
Leetcode URL
Solution -
Search in Rotated Sorted Array
Leetcode URL
Solution -
Construct Binary Search Tree from Preorder Traversal
Leetcode URL
Solution -
Leftmost Column with at Least a One
Leetcode URL
Solution
-
Subarray Sum Equals K
Leetcode URL
Solution -
Bitwise AND of Numbers Range
Leetcode URL
Solution -
LRU Cache
Leetcode URL
Solution -
Jump Game
Leetcode URL
Solution -
Longest Common Subsequence
Leetcode URL
Solution | Bottom Up approach
Solution | Top Down approach -
Maximal Square
Leetcode URL
Solution -
First Unique Number
Leetcode URL
Solution | Doubly Linked List approach
Solution | Queue approach
-
Binary Tree Maximum Path Sum
Leetcode URL
Solution -
Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Leetcode URL
Solution