Skip to content

woowenjun99/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

136 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

Total questions solved: 738

Question
3Sum
4Sum
4Sum II
Accounts Merge
Add Binary
Add Two Numbers
Add Two Numbers II
Add Two Polynomials Represented as Linked Lists
Adding Spaces to a String
Adjacent Increasing Subarrays Detection I
Adjacent Increasing Subarrays Detection II
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
Analyze User Website Visit Pattern
Append Characters to String to Make Subsequence
Apply Operations to Make String Empty
Apply Operations to an Array
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
Before and After Puzzle
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
Binary Watch
Boats to Save People
Books with NULL Ratings
Buildings With an Ocean View
Buy Two Chocolates
Calculate Money in Leetcode Bank
Capacity To Ship Packages Within D Days
Cheapest Flights Within K Stops
Check Balanced String
Check Digitorial Permutation
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 Number Is Majority Element in a Sorted Array
Check If a String Contains All Binary Codes of Size K
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 Any Element Has Prime Frequency
Check if Array Is Sorted and Rotated
Check if Array is Good
Check if Number is a Sum of Powers of Three
Check if Strings Can be Made Equal With Operations I
Check if Strings Can be Made Equal With Operations II
Check if the Sentence Is Pangram
Circular Sentence
Clear Digits
Clone Graph
Closest Binary Search Tree Value II
Closest Leaf in a Binary Tree
Closest Prime Numbers in Range
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 Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Postorder Traversal
Construct Smallest Number From DI String
Construct String With Repeat Limit
Construct String from Binary Tree
Construct String with Minimum Cost (Easy)
Construct the Lexicographically Largest Valid Sequence
Container With Most Water
Contains Duplicate
Convert 1D Array Into 2D Array
Convert BST to Greater Tree
Convert Binary Number in a Linked List to Integer
Convert Binary Search Tree to Sorted Doubly Linked List
Convert Doubly Linked List to Array I
Convert Doubly Linked List to Array II
Convert Integer to the Sum of Two No-Zero Integers
Convert Sorted Array to Binary Search Tree
Convert Sorted List to Binary Search Tree
Count Binary Substrings
Count Covered Buildings
Count Days Without Meetings
Count Dominant Indices
Count Elements With Maximum Frequency
Count Equal and Divisible Pairs in an Array
Count Mentions Per User
Count Number of Bad Pairs
Count Number of Maximum Bitwise-OR Subsets
Count Number of Nice Subarrays
Count Odd Letters from Number
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 Square Submatrices with All Ones
Count Total Number of Colored Cells
Count Triplets That Can Form Two Arrays of Equal XOR
Count Vowel Strings in Ranges
Count of Matches in Tournament
Count the Hidden Sequences
Count the Number of Complete Components
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
Decode the Slanted Ciphertext
Defuse the Bomb
Delete Characters to Make Fancy String
Delete Node in a Linked List
Delete Nodes From Linked List Present in Array
Delete the Middle Node of a Linked List
Design Bounded Blocking Queue
Design File System
Design HashMap
Design HashSet
Design Hit Counter
Design Linked List
Design Most Recently Used Queue
Design Movie Rental System
Design Neighbor Sum Service
Design Order Management System
Design Parking System
Design Phone Directory
Design Snake Game
Design Spreadsheet
Design Task Manager
Design Twitter
Design a Number Container System
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 Array Into Arrays With Max Difference
Divide Array Into Equal Pairs
Divide Intervals Into Minimum Number of Groups
Divide Players Into Teams of Equal Skill
Divide a String Into Groups of Size k
Dot Product of Two Sparse Vectors
Double a Number Represented as a Linked List
Duplicate Emails
Edit Distance
Encode and Decode Strings
Equal Sum Grid Partition I
Equal Tree Partition
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
Final Value of Variable After Performing Operations
Find All Anagrams in a String
Find All Groups of Farmland
Find All K-Distant Indices in an Array
Find All Possible Recipes from Given Supplies
Find Anagram Mappings
Find Books with No Available Copies
Find Bottom Left Tree Value
Find Champion II
Find Closest Person
Find Common Characters
Find Customer Referee
Find Distance in a Binary Tree
Find Elements in a Contaminated Binary Tree
Find First Palindromic String in the Array
Find First and Last Position of Element in Sorted Array
Find K-Length Substrings With No Repeated Characters
Find Largest Value in Each Tree Row
Find Lucky Integer in an Array
Find Minimum Operations to Make All Elements Divisible by Three
Find Minimum Time to Reach Last Room I
Find Missing and Repeated Values
Find Mode in Binary Search Tree
Find N Unique Integers Sum up to Zero
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 Common Element in All Rows
Find Smallest Letter Greater Than Target
Find Subsequence of Length K With the Largest Sum
Find Three Consecutive Integers That Sum to a Given Number
Find Triangular Sum of an Array
Find Unique Binary String
Find Words Containing Character
Find X-Sum of All K-Long Subarrays I
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 Original Typed String I
Find the Power of K-Size Subarrays I
Find the Power of K-Size Subarrays II
Find the Prefix Common Array of Two Arrays
Find the Punishment Number of an Integer
Find the Score Difference in a Game
Find the Smallest Balanced Index
Find the Student that Will Replace the Chalk
Find the Town Judge
Find the Winner of the Circular Game
Find the Winning Player in Coin Game
Finding Pairs With a Certain Sum
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
Fruit Into Baskets
Furthest Point From Origin
Generate Parentheses
Generate Tag for Video Caption
Graph Valid Tree
Grid Teleportation Traversal
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 Router
Implement Stack using Queues
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
Inverse Coin Change
Invert Binary Tree
Is Graph Bipartite?
Is Subsequence
Isomorphic Strings
Jewels and Stones
Jump Game
Jump Game II
Jump Game III
Jump Game IV
K Closest Points to Origin
Koko Eating Bananas
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 3-Same-Digit Number in String
Largest BST Subtree
Largest Divisible Subset
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 Fibonacci Subsequence
Length of Longest Subarray With at Most K Frequency
Letter Combinations of a Phone Number
Letter Tile Possibilities
Lexicographical Numbers
Lexicographically Minimum String After Removing Stars
Lexicographically Smallest Equivalent String
Lexicographically Smallest String After Applying Operations
Linked List Cycle
Linked List Frequency
Logger Rate Limiter
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 Nice Subarray
Longest Palindrome
Longest Palindromic Substring
Longest Repeating Character Replacement
Longest Square Streak in an Array
Longest Strictly Increasing or Strictly Decreasing Subarray
Longest Subarray With Maximum Bitwise AND
Longest Subarray of 1's After Deleting One Element
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 Deepest Leaves
Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Tree III
Magic Squares In Grid
Magnetic Force Between Two Balls
Majority Element
Make Array Non-decreasing
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 II
Max Consecutive Ones III
Max Difference You Can Get From Changing an Integer
Max Number of K-Sum Pairs
Max Sum of a Pair With Equal Sum of Digits
Maximal Score After Applying K Operations
Maximize Distance to Closest Person
Maximize Happiness of Selected Children
Maximize Profit from Task Assignment
Maximize the Total Height of Unique Towers
Maximum 69 Number
Maximum Area of Longest Diagonal Rectangle
Maximum Ascending Subarray Sum
Maximum Average Pass Ratio
Maximum Candies Allocated to K Children
Maximum Coins Heroes Can Collect
Maximum Count of Positive Integer and Negative Integer
Maximum Depth of Binary Tree
Maximum Depth of N-ary Tree
Maximum Difference Between Adjacent Elements in a Circular Array
Maximum Difference Between Increasing Elements
Maximum Distance in Arrays
Maximum Energy Boost From Two Drinks
Maximum Erasure Value
Maximum Frequency Stack
Maximum Level Sum of a Binary Tree
Maximum Matching of Players With Trainers
Maximum Matrix Sum
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 Number of Words You Can Type
Maximum Odd Binary Number
Maximum Possible Number by Binary Concatenation
Maximum Product of Splitted Binary Tree
Maximum Product of Two Digits
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 Twin Sum of a Linked List
Maximum Value of an Ordered Triplet I
Maximum Value of an Ordered Triplet II
Maximum Width of Binary Tree
Maximum XOR for Each Query
Meeting Rooms
Meeting Rooms III
Merge Adjacent Equal Elements
Merge In Between Linked Lists
Merge Intervals
Merge Nodes in Between Zeros
Merge Sorted Array
Merge Strings Alternately
Merge Two 2D Arrays by Summing Values
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 Capacity Box
Minimum Changes To Make Alternating Binary String
Minimum Common Value
Minimum Cost For Tickets
Minimum Cost Path with Edge Reversals
Minimum Cost Walk in Weighted Graph
Minimum Cost to Convert String I
Minimum Cost to Reach Every Position
Minimum Deletions for At Most K Distinct Characters
Minimum Depth of Binary Tree
Minimum Difference Between Largest and Smallest Value in Three Moves
Minimum Distance to the Target Element
Minimum Domino Rotations For Equal Row
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 Operations to Make Elements in Array Distinct
Minimum Number of Primes to Sum to Target
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 Array Values Equal to K
Minimum Operations to Make Binary Array Elements Equal to One I
Minimum Operations to Make Columns Strictly Increasing
Minimum Pair Removal to Sort Array I
Minimum Path Sum
Minimum Penalty for a Shop
Minimum Positive Sum Subarray
Minimum Recolors to Get K Consecutive Black Blocks
Minimum Remove to Make Valid Parentheses
Minimum Size Subarray Sum
Minimum String Length After Removing Substrings
Minimum Time Difference
Minimum Time Visiting All Points
Mirror Distance of an Integer
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-Queens
N-Queens II
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
Non-decreasing Subsequences
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 Smooth Descent Periods of a Stock
Number of Steps to Reduce a Number in Binary Representation to One
Number of Student Replacements
Number of Sub-arrays With Odd Sum
Number of Subsequences That Satisfy the Given Sum Condition
Number of Substrings With Only 1s
Number of Unique Flavors After Sharing K Candies
Number of Ways to Split Array
Number of Zero-Filled Subarrays
Odd Even Linked List
One Edit Distance
Pairs of Songs With Total Durations Divisible by 60
Palindrome Linked List
Palindrome Number
Palindrome Partitioning
Palindrome Permutation
Palindromic Substrings
Parallel Courses
Parsing A Boolean Expression
Partition Array According to Given Pivot
Partition Array into Two Equal Product Subsets
Partition List
Partitioning Into Minimum Number Of Deci-Binary Numbers
Pascal's Triangle
Pascal's Triangle II
Pass the Pillow
Password Strength
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 Grid Maintenance
Power of Four
Power of Three
Prime Number of Set Bits in Binary Representation
Prime Subtraction Operation
Print FooBar Alternately
Print in Order
Process String with Special Operations I
Product of Array Except Self
Product of the Last K Numbers
Put Boxes Into the Warehouse I
Put Boxes Into the Warehouse II
Rabbits in Forest
Range Addition
Range Product Queries of Powers
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
Recover a Tree From Preorder Traversal
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
Reordered Power of 2
Replace Elements with Greatest Element on Right Side
Replace Words
Restore Finishing Order
Restore IP Addresses
Restore the Array From Adjacent Pairs
Resulting String After Adjacent Removals
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 a 2D Matrix
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
Separate Squares I
Sequential Digits
Set Mismatch
Shifting Letters II
Shortest Distance After Road Addition Queries I
Shortest Distance from All Buildings
Shortest Distance to Target Color
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 Index With Digit Sum Equal to Index
Smallest Number With All Set Bits
Smallest Number in Infinite Set
Smallest Palindromic Rearrangement I
Smallest Rectangle Enclosing Black Pixels
Smallest String Starting From Leaf
Smallest Subtree with all the Deepest Nodes
Snake in Matrix
Solving Questions With Brainpower
Sort Array By Absolute Value
Sort Array By Parity
Sort Characters By Frequency
Sort Colors
Sort Integers by The Number of 1 Bits
Sort Threats by Severity and Exploitability
Sort Vowels by Frequency
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
Special Positions in a Binary Matrix
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
Successful Pairs of Spells and Potions
Sum Root to Leaf Numbers
Sum of Compatible Numbers in Range I
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
Taking Maximum Energy From the Mystic Dungeon
Target Sum
The Number of Ways to Make the Sum
The Number of the Smallest Unoccupied Chair
The Two Sneaky Numbers of Digitville
The k-th Lexicographical String of All Happy Strings of Length n
Third Maximum Number
Time Based Key-Value Store
Time Needed to Buy Tickets
To Be Or Not To Be
To Lower Case
Top K Frequent Elements
Top K Frequent Words
Total Waviness of Numbers in Range I
Transform Array by Parity
Transform Array to All Equal Elements
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 Binary Search Trees
Unique Email Groups
Unique Length-3 Palindromic Subsequences
Unique Number of Occurrences
Unique Paths
Unique Paths II
Unit Conversion I
Using a Robot to Print the Lexicographically Smallest String
Valid Anagram
Valid Binary Strings With Cost Limit
Valid Palindrome
Valid Parentheses
Valid Perfect Square
Valid Sudoku
Valid Word
Valid Word Square
Validate Binary Search Tree
Vertical Order Traversal of a Binary Tree
Vowel Spellchecker
Walking Robot Simulation
Walls and Gates
Water Bottles
Word Abbreviation
Word Break
Word Ladder
Word Search
Word Squares
Zigzag Conversion
Zigzag Grid Traversal With Skip
Zigzag Iterator

About

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

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages