Skip to content

Latest commit

 

History

History
369 lines (367 loc) · 28.6 KB

README.md

File metadata and controls

369 lines (367 loc) · 28.6 KB

Leetcode

Total questions solved: 363

Question
3Sum
4Sum
4Sum II
Add Binary
Add Two Numbers
Add Two Numbers II
All Elements in Two Binary Search Trees
All Paths From Source to Target
Amount of Time for Binary Tree to Be Infected
Append Characters to String to Make Subsequence
Assign Cookies
Average Waiting Time
Average of Levels in Binary Tree
Backspace String Compare
Balanced Binary Tree
Best Time to Buy and Sell Stock
Best Time to Buy and Sell Stock II
Binary Search
Binary Search Tree to Greater Sum Tree
Binary Tree Inorder Traversal
Binary Tree Level Order Traversal
Binary Tree Level Order Traversal II
Binary Tree Paths
Binary Tree Postorder Traversal
Binary Tree Preorder Traversal
Binary Tree Right Side View
Binary Tree Vertical Order Traversal
Binary Tree Zigzag Level Order Traversal
Buy Two Chocolates
Cheapest Flights Within K Stops
Check If Two String Arrays are Equivalent
Check if All A's Appears Before All B's
Check if the Sentence Is Pangram
Clone Graph
Closest Leaf in a Binary Tree
Coin Change
Coin Change II
Combination Sum
Combinations
Combine Two Tables
Compare Version Numbers
Concatenation of Array
Connecting Cities With Minimum Cost
Container With Most Water
Contains Duplicate
Convert 1D Array Into 2D Array
Convert Doubly Linked List to Array I
Convert Sorted Array to Binary Search Tree
Convert Sorted List to Binary Search Tree
Count Days Without Meetings
Count Elements With Maximum Frequency
Count Number of Nice Subarrays
Count Pairs Of Similar Strings
Count Pairs That Form a Complete Day I
Count Pairs That Form a Complete Day II
Count Primes
Count Triplets That Can Form Two Arrays of Equal XOR
Count of Matches in Tournament
Count the Number of Special Characters I
Counter
Counting Elements
Course Schedule
Course Schedule II
Create Binary Tree From Descriptions
Create Hello World Function
Custom Sort String
Daily Temperatures
Delete Node in a Linked List
Delete Nodes From Linked List Present in Array
Design Bounded Blocking Queue
Design HashMap
Design HashSet
Design Hit Counter
Design Parking System
Destination City
Detect Capital
Determine if String Halves Are Alike
Determine if Two Strings Are Close
Distribute Candies
Double a Number Represented as a Linked List
Edit Distance
Encode and Decode Strings
Evaluate Division
Evaluate Reverse Polish Notation
Even Odd Tree
Excel Sheet Column Number
Faulty Keyboard
Fibonacci Number
Find All Anagrams in a String
Find All Groups of Farmland
Find Bottom Left Tree Value
Find Common Characters
Find Customer Referee
Find Distance in a Binary Tree
Find First Palindromic String in the Array
Find First and Last Position of Element in Sorted Array
Find Largest Value in Each Tree Row
Find Minimum Operations to Make All Elements Divisible by Three
Find Mode in Binary Search Tree
Find Occurrences of an Element in an Array
Find Players With Zero or One Losses
Find Smallest Letter Greater Than Target
Find if Digit Game Can Be Won
Find the City With the Smallest Number of Neighbors at a Threshold Distance
Find the Closest Marked Node
Find the Difference
Find the Index of the First Occurrence in a String
Find the Integer Added to Array I
Find the Kth Largest Integer in the Array
Find the Level of Tree with Minimum Sum
Find the Minimum Area to Cover All Ones I
Find the Number of Good Pairs I
Find the Student that Will Replace the Chalk
Find the Winner of the Circular Game
First Unique Character in a String
Fizz Buzz
Flood Fill
Fraction Addition and Subtraction
Frequency Tracker
Generate Parentheses
Graph Valid Tree
Group Anagrams
Grumpy Bookstore Owner
Guess Number Higher or Lower
Hand of Straights
Happy Number
Height Checker
House Robber
House Robber II
House Robber III
IPO
Implement Queue using Stacks
Implement Trie (Prefix Tree)
Inorder Successor in BST
Insert Delete GetRandom O(1)
Insert Greatest Common Divisors in Linked List
Insert Interval
Integer Replacement
Intersection of Multiple Arrays
Intersection of Two Arrays
Invert Binary Tree
Is Graph Bipartite?
Is Subsequence
Jump Game
Jump Game II
Jump Game III
K Closest Points to Origin
Kth Distinct String in an Array
Kth Largest Element in a Stream
Kth Largest Element in an Array
Kth Largest Sum in a Binary Tree
Kth Smallest Element in a BST
Largest Positive Integer That Exists With Its Negative
Largest Substring Between Two Equal Characters
Last Stone Weight
Least Number of Unique Integers after K Removals
Length of Longest Subarray With at Most K Frequency
Letter Combinations of a Phone Number
Linked List Cycle
Linked List Frequency
Longest Common Prefix
Longest Common Subsequence
Longest Common Subsequence Between Sorted Arrays
Longest Consecutive Sequence
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Longest Increasing Subsequence
Longest Palindrome
Longest Palindromic Substring
Longest Repeating Character Replacement
Longest Substring Without Repeating Characters
Longest Substring with At Most K Distinct Characters
Longest Substring with At Most Two Distinct Characters
Longest Word in Dictionary
Longest Word in Dictionary through Deleting
Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Tree III
Magnetic Force Between Two Balls
Majority Element
Make Two Arrays Equal by Reversing Subarrays
Max Area of Island
Max Consecutive Ones
Max Consecutive Ones III
Max Number of K-Sum Pairs
Maximize Distance to Closest Person
Maximum 69 Number
Maximum Depth of Binary Tree
Maximum Depth of N-ary Tree
Maximum Difference Between Increasing Elements
Maximum Distance in Arrays
Maximum Energy Boost From Two Drinks
Maximum Nesting Depth of the Parentheses
Maximum Number of Balloons
Maximum Number of Coins You Can Get
Maximum Number of Points with Cost
Maximum Number of Vowels in a Substring of Given Length
Maximum Odd Binary Number
Maximum Product of Two Elements in an Array
Maximum Subarray
Maximum Total Importance of Roads
Meeting Rooms
Merge In Between Linked Lists
Merge Intervals
Merge Nodes in Between Zeros
Merge Sorted Array
Merge Strings Alternately
Merge Two Sorted Lists
Merge k Sorted Lists
Middle of the Linked List
Min Cost to Connect All Points
Min Stack
Minimum Absolute Difference in BST
Minimum Average of Smallest and Largest Elements
Minimum Bit Flips to Convert Number
Minimum Common Value
Minimum Cost to Convert String I
Minimum Depth of Binary Tree
Minimum Difference Between Largest and Smallest Value in Three Moves
Minimum Flips to Make a OR b Equal to c
Minimum Increment to Make Array Unique
Minimum Number of Days to Make m Bouquets
Minimum Number of K Consecutive Bit Flips
Minimum Number of Moves to Seat Everyone
Minimum Number of Operations to Make Array Empty
Minimum Number of Steps to Make Two Strings Anagram
Minimum Operations to Exceed Threshold Value I
Minimum Operations to Exceed Threshold Value II
Minimum Path Sum
Minimum Size Subarray Sum
Missing Number
Most Common Word
Most Profit Assigning Work
Move Zeroes
N-ary Tree Level Order Traversal
N-ary Tree Postorder Traversal
N-ary Tree Preorder Traversal
Nearest Exit from Entrance in Maze
Network Delay Time
Number of 1 Bits
Number of Bit Changes to Make Two Integers Equal
Number of Connected Components in an Undirected Graph
Number of Good Pairs
Number of Islands
Number of Laser Beams in a Bank
Number of Provinces
Number of Recent Calls
Number of Segments in a String
Number of Senior Citizens
Number of Steps to Reduce a Number in Binary Representation to One
One Edit Distance
Pairs of Songs With Total Durations Divisible by 60
Palindrome Linked List
Palindrome Number
Palindromic Substrings
Pass the Pillow
Path Sum
Path Sum II
Path with Maximum Gold
Path with Maximum Probability
Perfect Number
Perfect Squares
Permutations
Permutations II
Plus One
Power of Three
Print FooBar Alternately
Print in Order
Product of Array Except Self
Put Boxes Into the Warehouse I
Put Boxes Into the Warehouse II
Range Sum Query - Immutable
Range Sum of BST
Range Sum of Sorted Subarray Sums
Ransom Note
Rearrange Array Elements by Sign
Redistribute Characters to Make All Strings Equal
Redundant Connection
Relative Sort Array
Remove Duplicates From an Unsorted Linked List
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted List
Remove Duplicates from Sorted List II
Remove Element
Remove Linked List Elements
Remove Nodes From Linked List
Remove Nth Node From End of List
Remove Vowels from a String
Removing Stars From a String
Replace Elements with Greatest Element on Right Side
Replace Words
Restore the Array From Adjacent Pairs
Reverse Integer
Reverse Linked List
Reverse String
Reverse Substrings Between Each Pair of Parentheses
Reverse Vowels of a String
Reverse Words in a String
Reverse Words in a String III
Robot Return to Origin
Roman to Integer
Rotting Oranges
Running Sum of 1d Array
Same Tree
Score of a String
Search Insert Position
Search in Rotated Sorted Array
Search in a Binary Search Tree
Separate Black and White Balls
Sequential Digits
Set Mismatch
Shortest Word Distance
Shortest Word Distance III
Sign of the Product of an Array
Single Element in a Sorted Array
Single Number
Single Number III
Smallest Number in Infinite Set
Smallest String Starting From Leaf
Sort Characters By Frequency
Sort Colors
Sort an Array
Sort the People
Special Array With X Elements Greater Than or Equal X
Spiral Matrix
Sqrt(x)
Step-By-Step Directions From a Binary Tree Node to Another
String Compression III
String to Integer (atoi)
Student Attendance Record I
Subarray Sum Equals K
Subarray Sums Divisible by K
Subsets
Substrings That Begin and End With the Same Letter
Sum Root to Leaf Numbers
Sum of Digits of String After Convert
Sum of Left Leaves
Sum of Square Numbers
Sum of Unique Elements
Summary Ranges
Swapping Nodes in a Linked List
The Number of Ways to Make the Sum
To Lower Case
Top K Frequent Elements
Top K Frequent Words
Tree Diameter
Two Sum
Two Sum BSTs
Two Sum II - Input Array Is Sorted
Two Sum III - Data structure design
Two Sum IV - Input is a BST
Two Sum Less Than K
Ugly Number
Unique Number of Occurrences
Unique Paths
Unique Paths II
Valid Anagram
Valid Palindrome
Valid Parentheses
Valid Perfect Square
Valid Sudoku
Validate Binary Search Tree
Water Bottles
Word Search
Zigzag Conversion