Skip to content

Bought a leetcode premium, solving a few questions everyday, uploading my solutions onto this account.

Notifications You must be signed in to change notification settings

woowenjun99/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

Total questions solved: 533

Question
3Sum
4Sum
4Sum II
Add Binary
Add Two Numbers
Add Two Numbers II
Add Two Polynomials Represented as Linked Lists
Adding Spaces to a String
All Elements in Two Binary Search Trees
All Nodes Distance K in Binary Tree
All Paths From Source to Target
Amount of Time for Binary Tree to Be Infected
Append Characters to String to Make Subsequence
Apply Operations to Make String Empty
Array Nesting
As Far from Land as Possible
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
Big Countries
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 Longest Consecutive Sequence
Binary Tree Paths
Binary Tree Postorder Traversal
Binary Tree Preorder Traversal
Binary Tree Right Side View
Binary Tree Tilt
Binary Tree Vertical Order Traversal
Binary Tree Zigzag Level Order Traversal
Boats to Save People
Books with NULL Ratings
Buildings With an Ocean View
Buy Two Chocolates
Capacity To Ship Packages Within D Days
Cheapest Flights Within K Stops
Check Balanced String
Check If Array Pairs Are Divisible by k
Check If Two String Arrays are Equivalent
Check If Word Is Valid After Substitutions
Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Check If a Word Occurs As a Prefix of Any Word in a Sentence
Check if All A's Appears Before All B's
Check if Array Is Sorted and Rotated
Check if the Sentence Is Pangram
Circular Sentence
Clone Graph
Closest Leaf in a Binary Tree
Coin Change
Coin Change II
Combination Sum
Combination Sum II
Combinations
Combine Two Tables
Compare Version Numbers
Concatenation of Array
Connecting Cities With Minimum Cost
Construct String With Repeat Limit
Construct String from Binary Tree
Construct String with Minimum Cost (Easy)
Container With Most Water
Contains Duplicate
Convert 1D Array Into 2D Array
Convert BST to Greater Tree
Convert Binary Search Tree to Sorted Doubly Linked List
Convert Doubly Linked List to Array I
Convert Doubly Linked List to Array II
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 Maximum Bitwise-OR Subsets
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 Prefix and Suffix Pairs I
Count Primes
Count Triplets That Can Form Two Arrays of Equal XOR
Count Vowel Strings in Ranges
Count of Matches in Tournament
Count the Number of Consistent Strings
Count the Number of Special Characters I
Counter
Counting Bits
Counting Elements
Course Schedule
Course Schedule II
Course Schedule IV
Cousins in Binary Tree II
Create Binary Tree From Descriptions
Create Hello World Function
Custom Sort String
Daily Temperatures
Defuse the Bomb
Delete Characters to Make Fancy String
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 Linked List
Design Neighbor Sum Service
Design Parking System
Design Phone Directory
Design a Stack With Increment Operation
Destination City
Detect Capital
Determine if String Halves Are Alike
Determine if Two Strings Are Close
Distinct Numbers in Each Subarray
Distribute Candies
Divide Intervals Into Minimum Number of Groups
Divide Players Into Teams of Equal Skill
Double a Number Represented as a Linked List
Duplicate Emails
Edit Distance
Encode and Decode Strings
Evaluate Division
Evaluate Reverse Polish Notation
Even Odd Tree
Excel Sheet Column Number
Faulty Keyboard
Fibonacci Number
Final Array State After K Multiplication Operations I
Find All Anagrams in a String
Find All Groups of Farmland
Find Anagram Mappings
Find Bottom Left Tree Value
Find Champion II
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 Score of an Array After Marking All Elements
Find Smallest Letter Greater Than Target
Find Words Containing Character
Find if Array Can Be Sorted
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 Duplicate Number
Find the Index of the First Occurrence in a String
Find the Integer Added to Array I
Find the K-th Character in String Game I
Find the Kth Largest Integer in the Array
Find the Length of the Longest Common Prefix
Find the Level of Tree with Minimum Sum
Find the Minimum Area to Cover All Ones I
Find the Number of Distinct Colors Among the Balls
Find the Number of Good Pairs I
Find the Power of K-Size Subarrays I
Find the Power of K-Size Subarrays II
Find the Student that Will Replace the Chalk
Find the Winner of the Circular Game
Find the Winning Player in Coin Game
First Completely Painted Row or Column
First Unique Character in a String
First Unique Number
Fizz Buzz
Flip Equivalent Binary Trees
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
Hash Divided String
Height Checker
House Robber
House Robber II
House Robber III
How Many Apples Can You Put into the Basket
IPO
Implement Queue using Stacks
Implement Trie (Prefix Tree)
Implement Trie II (Prefix Tree)
Increasing Order Search 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 Three Sorted Arrays
Intersection of Two Arrays
Invert Binary Tree
Is Graph Bipartite?
Is Subsequence
Isomorphic Strings
Jewels and Stones
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 Number At Least Twice of Others
Largest Odd Number in String
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 Happy String
Longest Increasing Subsequence
Longest Palindrome
Longest Palindromic Substring
Longest Repeating Character Replacement
Longest Square Streak in an Array
Longest Strictly Increasing or Strictly Decreasing Subarray
Longest Substring Without Repeating Characters
Longest Substring with At Most K Distinct Characters
Longest Substring with At Most Two Distinct Characters
Longest Word With All Prefixes
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 Array Zero by Subtracting Equal Amounts
Make String a Subsequence Using Cyclic Increments
Make The String Great
Make Two Arrays Equal by Reversing Subarrays
Max Area of Island
Max Chunks To Make Sorted
Max Consecutive Ones
Max Consecutive Ones III
Max Number of K-Sum Pairs
Maximal Score After Applying K Operations
Maximize Distance to Closest Person
Maximize the Total Height of Unique Towers
Maximum 69 Number
Maximum Ascending Subarray Sum
Maximum Average Pass Ratio
Maximum Coins Heroes Can Collect
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 Fish in a Grid
Maximum Number of Points with Cost
Maximum Number of Vowels in a Substring of Given Length
Maximum Odd Binary Number
Maximum Possible Number by Binary Concatenation
Maximum Product of Two Elements in an Array
Maximum Score After Splitting a String
Maximum Size Subarray Sum Equals k
Maximum Subarray
Maximum Sum of Distinct Subarrays With Length K
Maximum Swap
Maximum Total Importance of Roads
Maximum XOR for Each Query
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 Climbing Stairs
Min Cost to Connect All Points
Min Stack
Minimum Absolute Difference in BST
Minimum Add to Make Parentheses Valid
Minimum Average of Smallest and Largest Elements
Minimum Bit Flips to Convert Number
Minimum Common Value
Minimum Cost For Tickets
Minimum Cost to Convert String I
Minimum Depth of Binary Tree
Minimum Difference Between Largest and Smallest Value in Three Moves
Minimum Element After Replacement With Digit Sum
Minimum Falling Path Sum
Minimum Flips to Make a OR b Equal to c
Minimum Genetic Mutation
Minimum Increment to Make Array Unique
Minimum Levels to Gain More Points
Minimum Number of Changes to Make Binary String Beautiful
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 Number of Vertices to Reach All Nodes
Minimum Obstacle Removal to Reach Corner
Minimum Operations to Exceed Threshold Value I
Minimum Operations to Exceed Threshold Value II
Minimum Operations to Make Columns Strictly Increasing
Minimum Path Sum
Minimum Positive Sum Subarray
Minimum Remove to Make Valid Parentheses
Minimum Size Subarray Sum
Minimum String Length After Removing Substrings
Minimum Time Difference
Missing Number
Monotonic Stack
Most Beautiful Item for Each Query
Most Common Word
Most Frequent Subtree Sum
Most Profit Assigning Work
Move Pieces to Obtain a String
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
Next Greater Element I
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
Number of Unique Flavors After Sharing K Candies
Number of Ways to Split Array
Odd Even Linked List
One Edit Distance
Pairs of Songs With Total Durations Divisible by 60
Palindrome Linked List
Palindrome Number
Palindrome Partitioning
Palindromic Substrings
Parallel Courses
Parsing A Boolean Expression
Partition List
Pascal's Triangle
Pascal's Triangle II
Pass the Pillow
Path Sum
Path Sum II
Path with Maximum Gold
Path with Maximum Probability
Perfect Number
Perfect Squares
Perform String Shifts
Permutation in String
Permutations
Permutations II
Plus One
Power of Three
Prime Subtraction Operation
Print FooBar Alternately
Print in Order
Product of Array Except Self
Put Boxes Into the Warehouse I
Put Boxes Into the Warehouse II
Range Addition
Range Sum Query - Immutable
Range Sum of BST
Range Sum of Sorted Subarray Sums
Rank Transform of an Array
Ransom Note
Rearrange Array Elements by Sign
Rearrange K Substrings to Form Target String
Rearrange Words in a Sentence
Redistribute Characters to Make All Strings Equal
Redundant Connection
Relative Sort Array
Remove All Adjacent Duplicates In String
Remove All Adjacent Duplicates in String II
Remove Colored Pieces if Both Neighbors are the Same Color
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 Methods From Project
Remove Nodes From Linked List
Remove Nth Node From End of List
Remove Sub-Folders from the Filesystem
Remove Trailing Zeros From a String
Remove Vowels from a String
Removing Stars From a String
Replace Elements with Greatest Element on Right Side
Replace Words
Restore IP Addresses
Restore the Array From Adjacent Pairs
Return Length of Arguments Passed
Reverse Integer
Reverse Linked List
Reverse Odd Levels of Binary Tree
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
Rotate List
Rotate String
Rotting Oranges
Running Sum of 1d Array
Same Tree
Score of a String
Search Insert Position
Search Suggestions System
Search in Rotated Sorted Array
Search in a Binary Search Tree
Search in a Sorted Array of Unknown Size
Seat Reservation Manager
Sentence Similarity III
Separate Black and White Balls
Sequential Digits
Set Mismatch
Shifting Letters II
Shortest Distance After Road Addition Queries I
Shortest Path to Get Food
Shortest Word Distance
Shortest Word Distance III
Sign of the Product of an Array
Simple Bank System
Simplify Path
Single Element in a Sorted Array
Single Number
Single Number III
Smallest Number in Infinite Set
Smallest String Starting From Leaf
Snake in Matrix
Sort Array By Parity
Sort Characters By Frequency
Sort Colors
Sort Integers by The Number of 1 Bits
Sort Vowels in a String
Sort an Array
Sort the Jumbled Numbers
Sort the People
Sorting the Sentence
Special Array I
Special Array With X Elements Greater Than or Equal X
Spiral Matrix
Split Linked List in Parts
Split a String Into the Max Number of Unique Substrings
Sqrt(x)
Step-By-Step Directions From a Binary Tree Node to Another
String Compression III
String Matching in an Array
String to Integer (atoi)
Student Attendance Record I
Subarray Product Less Than K
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 Prefix Scores of Strings
Sum of Square Numbers
Sum of Unique Elements
Summary Ranges
Swap Nodes in Pairs
Swapping Nodes in a Linked List
Symmetric Tree
Take Gifts From the Richest Pile
Target Sum
The Number of Ways to Make the Sum
The Number of the Smallest Unoccupied Chair
Third Maximum Number
Time Needed to Buy Tickets
To Be Or Not To Be
To Lower Case
Top K Frequent Elements
Top K Frequent Words
Tree Diameter
Tuple with Same Product
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 Length-3 Palindromic Subsequences
Unique Number of Occurrences
Unique Paths
Unique Paths II
Valid Anagram
Valid Palindrome
Valid Parentheses
Valid Perfect Square
Valid Sudoku
Validate Binary Search Tree
Vertical Order Traversal of a Binary Tree
Walls and Gates
Water Bottles
Word Break
Word Search
Zigzag Conversion

About

Bought a leetcode premium, solving a few questions everyday, uploading my solutions onto this account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages