File tree
1,805 files changed
+71316
-0
lines changed- scripts/algorithms
- 0-9
- 01 Matrix
- 1-bit and 2-bit Characters
- 132 Pattern
- 2 Keys Keyboard
- 24 Game
- 3Sum
- 3Sum Closest
- 3Sum With Multiplicity
- 4Sum
- 4Sum II
- A
- A Number After a Double Reversal
- Abbreviating the Product of a Range
- Accounts Merge
- Add Binary
- Add Digits
- Add Minimum Number of Rungs
- Add One Row to Tree
- Add Strings
- Add Two Integers
- Add Two Numbers
- Add Two Numbers II
- Add to Array-Form of Integer
- Adding Spaces to a String
- Adding Two Negabinary Numbers
- Additive Number
- Advantage Shuffle
- Airplane Seat Assignment Probability
- Alert Using Same Key-Card Three or More Times in a One Hour Period
- All Ancestors of a Node in a Directed Acyclic Graph
- All Divisions With the Highest Score of a Binary Array
- All Elements in Two Binary Search Trees
- All Nodes Distance K in Binary Tree
- All O`one Data Structure
- All Paths From Source to Target
- All Possible Full Binary Trees
- Allocate Mailboxes
- Alphabet Board Path
- Ambiguous Coordinates
- Angle Between Hands of a Clock
- Append K Integers With Minimal Sum
- Apply Discount Every n Orders
- Apply Discount to Prices
- Arithmetic Slices
- Arithmetic Slices II - Subsequence
- Arithmetic Subarrays
- Arranging Coins
- Array Nesting
- Array Partition
- Array With Elements Not Equal to Average of Neighbors
- Array of Doubled Pairs
- As Far from Land as Possible
- Assign Cookies
- Asteroid Collision
- Available Captures for Rook
- Average Salary Excluding the Minimum and Maximum Salary
- Average Waiting Time
- Average of Levels in Binary Tree
- Avoid Flood in The City
- B
- Backspace String Compare
- Bag of Tokens
- Balance a Binary Search Tree
- Balanced Binary Tree
- Baseball Game
- Basic Calculator
- Basic Calculator II
- Basic Calculator IV
- Battleships in a Board
- Beautiful Arrangement
- Beautiful Arrangement II
- Beautiful Array
- Best Poker Hand
- Best Position for a Service Centre
- Best Sightseeing Pair
- Best Team With No Conflicts
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Best Time to Buy and Sell Stock with Cooldown
- Best Time to Buy and Sell Stock with Transaction Fee
- Binary Gap
- Binary Number with Alternating Bits
- Binary Search
- Binary Search Tree Iterator
- Binary Search Tree to Greater Sum Tree
- Binary String With Substrings Representing 1 To N
- Binary Subarrays With Sum
- Binary Tree Cameras
- Binary Tree Coloring Game
- Binary Tree Inorder Traversal
- Binary Tree Level Order Traversal
- Binary Tree Level Order Traversal II
- Binary Tree Maximum Path Sum
- Binary Tree Paths
- Binary Tree Postorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Pruning
- Binary Tree Right Side View
- Binary Tree Tilt
- Binary Tree Zigzag Level Order Traversal
- Binary Trees With Factors
- Binary Watch
- Bitwise AND of Numbers Range
- Bitwise ORs of Subarrays
- Boats to Save People
- Booking Concert Tickets in Groups
- Brace Expansion II
- Break a Palindrome
- Brick Wall
- Bricks Falling When Hit
- Broken Calculator
- Buddy Strings
- Build Array Where You Can Find The Maximum Exactly K Comparisons
- Build Array from Permutation
- Build an Array With Stack Operations
- Building Boxes
- Bulb Switcher
- Bulb Switcher II
- Bulls and Cows
- Burst Balloons
- Bus Routes
- C
- Calculate Amount Paid in Taxes
- Calculate Digit Sum of a String
- Calculate Money in Leetcode Bank
- Camelcase Matching
- Can Convert String in K Moves
- Can I Win
- Can Make Arithmetic Progression From Sequence
- Can Make Palindrome from Substring
- Can Place Flowers
- Candy
- Capacity To Ship Packages Within D Days
- Capitalize the Title
- Car Fleet
- Car Fleet II
- Car Pooling
- Card Flipping Game
- Cat and Mouse
- Cat and Mouse II
- Cells in a Range on an Excel Sheet
- Cells with Odd Values in a Matrix
- Chalkboard XOR Game
- Champagne Tower
- Change Minimum Characters to Satisfy One of Three Conditions
- Cheapest Flights Within K Stops
- Check Array Formation Through Concatenation
- Check Completeness of a Binary Tree
- Check If All 1's Are at Least Length K Places Away
- Check If Array Pairs Are Divisible by k
- Check If It Is a Good Array
- Check If It Is a Straight Line
- Check If N and Its Double Exist
- Check If String Is Transformable With Substring Sort Operations
- Check If String Is a Prefix of Array
- Check If Two String Arrays are Equivalent
- Check If Word Is Valid After Substitutions
- Check If a String Can Break Another String
- Check If a String Contains All Binary Codes of Size K
- Check If a Word Occurs As a Prefix of Any Word in a Sentence
- Check Whether Two Strings are Almost Equivalent
- Check if All A's Appears Before All B's
- Check if All Characters Have Equal Number of Occurrences
- Check if All the Integers in a Range Are Covered
- Check if Array Is Sorted and Rotated
- Check if Binary String Has at Most One Segment of Ones
- Check if Every Row and Column Contains All Numbers
- Check if Matrix Is X-Matrix
- Check if Move is Legal
- Check if Number Has Equal Digit Count and Digit Value
- Check if Number is a Sum of Powers of Three
- Check if Numbers Are Ascending in a Sentence
- Check if One String Swap Can Make Strings Equal
- Check if There Is a Valid Parentheses String Path
- Check if There is a Valid Partition For The Array
- Check if There is a Valid Path in a Grid
- Check if Word Can Be Placed In Crossword
- Check if Word Equals Summation of Two Words
- Check if a Parentheses String Can Be Valid
- Check if an Original String Exists Given Two Encoded Strings
- Check if the Sentence Is Pangram
- Checking Existence of Edge Length Limited Paths
- Cherry Pickup
- Cherry Pickup II
- Cinema Seat Allocation
- Circle and Rectangle Overlapping
- Circular Array Loop
- Circular Permutation in Binary Representation
- Climbing Stairs
- Clone Graph
- Closest Dessert Cost
- Closest Divisors
- Closest Room
- Closest Subsequence Sum
- Clumsy Factorial
- Coin Change
- Coloring A Border
- Combination Sum
- Combination Sum II
- Combination Sum III
- Combination Sum IV
- Combinations
- Compare Strings by Frequency of the Smallest Character
- Compare Version Numbers
- Complement of Base 10 Integer
- Complete Binary Tree Inserter
- Complex Number Multiplication
- Concatenated Words
- Concatenation of Array
- Concatenation of Consecutive Binary Numbers
- Consecutive Characters
- Consecutive Numbers Sum
- Constrained Subsequence Sum
- Construct Binary Search Tree from Preorder Traversal
- Construct Binary Tree from Inorder and Postorder Traversal
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Preorder and Postorder Traversal
- Construct K Palindrome Strings
- Construct Quad Tree
- Construct String With Repeat Limit
- Construct String from Binary Tree
- Construct Target Array With Multiple Sums
- Construct the Lexicographically Largest Valid Sequence
- Construct the Rectangle
- Contain Virus
- Container With Most Water
- Contains Duplicate
- Contains Duplicate II
- Contains Duplicate III
- Contiguous Array
- Continuous Subarray Sum
- Convert 1D Array Into 2D Array
- Convert BST to Greater Tree
- Convert Binary Number in a Linked List to Integer
- Convert Integer to the Sum of Two No-Zero Integers
- Convert Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Convert a Number to Hexadecimal
- Coordinate With Maximum Network Quality
- Copy List with Random Pointer
- Corporate Flight Bookings
- Count All Possible Routes
- Count All Valid Pickup and Delivery Options
- Count Array Pairs Divisible by K
- Count Artifacts That Can Be Extracted
- Count Asterisks
- Count Binary Substrings
- Count Collisions on a Road
- Count Common Words With One Occurrence
- Count Complete Tree Nodes
- Count Different Palindromic Subsequences
- Count Elements With Strictly Smaller and Greater Elements
- Count Equal and Divisible Pairs in an Array
- Count Fertile Pyramids in a Land
- Count Good Meals
- Count Good Nodes in Binary Tree
- Count Good Numbers
- Count Good Triplets
- Count Good Triplets in an Array
- Count Hills and Valleys in an Array
- Count Integers With Even Digit Sum
- Count Integers in Intervals
- Count Items Matching a Rule
- Count Largest Group
- Count Lattice Points Inside a Circle
- Count Negative Numbers in a Sorted Matrix
- Count Nice Pairs in an Array
- Count Nodes Equal to Average of Subtree
- Count Nodes With the Highest Score
- Count Number of Bad Pairs
- Count Number of Homogenous Substrings
- Count Number of Maximum Bitwise-OR Subsets
- Count Number of Nice Subarrays
- Count Number of Pairs With Absolute Difference K
- Count Number of Rectangles Containing Each Point
- Count Number of Special Subsequences
- Count Number of Teams
- Count Number of Texts
- Count Number of Ways to Place Houses
- Count Numbers with Unique Digits
- Count Odd Numbers in an Interval Range
- Count Operations to Obtain Zero
- Count Pairs Of Nodes
- Count Pairs With XOR in a Range
- Count Prefixes of a Given String
- Count Primes
- Count Servers that Communicate
- Count Sorted Vowel Strings
- Count Special Quadruplets
- Count Square Submatrices with All Ones
- Count Square Sum Triples
- Count Sub Islands
- Count Subarrays With Score Less Than K
- Count Submatrices With All Ones
- Count Substrings That Differ by One Character
- Count Subtrees With Max Distance Between Cities
- Count The Repetitions
- Count Triplets That Can Form Two Arrays of Equal XOR
- Count Unguarded Cells in the Grid
- Count Unhappy Friends
- Count Unique Characters of All Substrings of a Given String
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,805 files changed
+71316
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + |
0 commit comments