File tree
1,663 files changed
+6117
-9051
lines changed- lcci/04.01.Route Between Nodes
- lcof/面试题68 - II. 二叉树的最近公共祖先
- lcof2
- 剑指 Offer II 063. 替换单词
- 剑指 Offer II 119. 最长连续序列
- solution
- 0100-0199
- 0127.Word Ladder
- 0128.Longest Consecutive Sequence
- 0167.Two Sum II - Input Array Is Sorted
- 0200-0299
- 0207.Course Schedule
- 0208.Implement Trie (Prefix Tree)
- 0209.Minimum Size Subarray Sum
- 0210.Course Schedule II
- 0211.Design Add and Search Words Data Structure
- 0212.Word Search II
- 0214.Shortest Palindrome
- 0215.Kth Largest Element in an Array
- 0216.Combination Sum III
- 0217.Contains Duplicate
- 0218.The Skyline Problem
- 0219.Contains Duplicate II
- 0220.Contains Duplicate III
- 0222.Count Complete Tree Nodes
- 0229.Majority Element II
- 0230.Kth Smallest Element in a BST
- 0234.Palindrome Linked List
- 0235.Lowest Common Ancestor of a Binary Search Tree
- 0238.Product of Array Except Self
- 0239.Sliding Window Maximum
- 0240.Search a 2D Matrix II
- 0241.Different Ways to Add Parentheses
- 0242.Valid Anagram
- 0247.Strobogrammatic Number II
- 0249.Group Shifted Strings
- 0255.Verify Preorder Sequence in Binary Search Tree
- 0257.Binary Tree Paths
- 0259.3Sum Smaller
- 0261.Graph Valid Tree
- 0266.Palindrome Permutation
- 0269.Alien Dictionary
- 0270.Closest Binary Search Tree Value
- 0272.Closest Binary Search Tree Value II
- 0275.H-Index II
- 0283.Move Zeroes
- 0284.Peeking Iterator
- 0286.Walls and Gates
- 0287.Find the Duplicate Number
- 0288.Unique Word Abbreviation
- 0289.Game of Life
- 0290.Word Pattern
- 0291.Word Pattern II
- 0293.Flip Game
- 0294.Flip Game II
- 0295.Find Median from Data Stream
- 0297.Serialize and Deserialize Binary Tree
- 0298.Binary Tree Longest Consecutive Sequence
- 0299.Bulls and Cows
- 0300-0399
- 0300.Longest Increasing Subsequence
- 0301.Remove Invalid Parentheses
- 0302.Smallest Rectangle Enclosing Black Pixels
- 0304.Range Sum Query 2D - Immutable
- 0305.Number of Islands II
- 0306.Additive Number
- 0307.Range Sum Query - Mutable
- 0308.Range Sum Query 2D - Mutable
- 0310.Minimum Height Trees
- 0311.Sparse Matrix Multiplication
- 0312.Burst Balloons
- 0315.Count of Smaller Numbers After Self
- 0317.Shortest Distance from All Buildings
- 0318.Maximum Product of Word Lengths
- 0323.Number of Connected Components in an Undirected Graph
- 0324.Wiggle Sort II
- 0325.Maximum Size Subarray Sum Equals k
- 0327.Count of Range Sum
- 0328.Odd Even Linked List
- 0329.Longest Increasing Path in a Matrix
- 0333.Largest BST Subtree
- 0334.Increasing Triplet Subsequence
- 0335.Self Crossing
- 0337.House Robber III
- 0346.Moving Average from Data Stream
- 0347.Top K Frequent Elements
- 0349.Intersection of Two Arrays
- 0350.Intersection of Two Arrays II
- 0352.Data Stream as Disjoint Intervals
- 0354.Russian Doll Envelopes
- 0357.Count Numbers with Unique Digits
- 0360.Sort Transformed Array
- 0361.Bomb Enemy
- 0366.Find Leaves of Binary Tree
- 0367.Valid Perfect Square
- 0371.Sum of Two Integers
- 0372.Super Pow
- 0373.Find K Pairs with Smallest Sums
- 0375.Guess Number Higher or Lower II
- 0380.Insert Delete GetRandom O(1)
- 0382.Linked List Random Node
- 0383.Ransom Note
- 0384.Shuffle an Array
- 0385.Mini Parser
- 0386.Lexicographical Numbers
- 0390.Elimination Game
- 0391.Perfect Rectangle
- 0392.Is Subsequence
- 0393.UTF-8 Validation
- 0396.Rotate Function
- 0397.Integer Replacement
- 0398.Random Pick Index
- 0399.Evaluate Division
- 0400-0499
- 0400.Nth Digit
- 0401.Binary Watch
- 0405.Convert a Number to Hexadecimal
- 0406.Queue Reconstruction by Height
- 0410.Split Array Largest Sum
- 0412.Fizz Buzz
- 0414.Third Maximum Number
- 0415.Add Strings
- 0416.Partition Equal Subset Sum
- 0417.Pacific Atlantic Water Flow
- 0419.Battleships in a Board
- 0420.Strong Password Checker
- 0421.Maximum XOR of Two Numbers in an Array
- 0424.Longest Repeating Character Replacement
- 0426.Convert Binary Search Tree to Sorted Doubly Linked List
- 0427.Construct Quad Tree
- 0429.N-ary Tree Level Order Traversal
- 0433.Minimum Genetic Mutation
- 0434.Number of Segments in a String
- 0435.Non-overlapping Intervals
- 0436.Find Right Interval
- 0438.Find All Anagrams in a String
- 0440.K-th Smallest in Lexicographical Order
- 0441.Arranging Coins
- 0442.Find All Duplicates in an Array
- 0443.String Compression
- 0444.Sequence Reconstruction
- 0445.Add Two Numbers II
- 0447.Number of Boomerangs
- 0448.Find All Numbers Disappeared in an Array
- 0450.Delete Node in a BST
- 0452.Minimum Number of Arrows to Burst Balloons
- 0453.Minimum Moves to Equal Array Elements
- 0456.132 Pattern
- 0463.Island Perimeter
- 0464.Can I Win
- 0467.Unique Substrings in Wraparound String
- 0472.Concatenated Words
- 0473.Matchsticks to Square
- 0474.Ones and Zeroes
- 0475.Heaters
- 0477.Total Hamming Distance
- 0479.Largest Palindrome Product
- 0482.License Key Formatting
- 0489.Robot Room Cleaner
- 0490.The Maze
- 0491.Increasing Subsequences
- 0493.Reverse Pairs
- 0494.Target Sum
- 0496.Next Greater Element I
- 0498.Diagonal Traverse
- 0499.The Maze III
- 0500-0599
- 0500.Keyboard Row
- 0501.Find Mode in Binary Search Tree
- 0503.Next Greater Element II
- 0504.Base 7
- 0505.The Maze II
- 0506.Relative Ranks
- 0507.Perfect Number
- 0510.Inorder Successor in BST II
- 0513.Find Bottom Left Tree Value
- 0515.Find Largest Value in Each Tree Row
- 0522.Longest Uncommon Subsequence II
- 0523.Continuous Subarray Sum
- 0524.Longest Word in Dictionary through Deleting
- 0525.Contiguous Array
- 0526.Beautiful Arrangement
- 0528.Random Pick with Weight
- 0531.Lonely Pixel I
- 0532.K-diff Pairs in an Array
- 0533.Lonely Pixel II
- 0535.Encode and Decode TinyURL
- 0536.Construct Binary Tree from String
- 0539.Minimum Time Difference
- 0540.Single Element in a Sorted Array
- 0541.Reverse String II
- 0542.01 Matrix
- 0544.Output Contest Matches
- 0547.Number of Provinces
- 0548.Split Array with Equal Sum
- 0549.Binary Tree Longest Consecutive Sequence II
- 0551.Student Attendance Record I
- 0556.Next Greater Element III
- 0557.Reverse Words in a String III
- 0560.Subarray Sum Equals K
- 0564.Find the Closest Palindrome
- 0582.Kill Process
- 0583.Delete Operation for Two Strings
- 0587.Erect the Fence
- 0589.N-ary Tree Preorder Traversal
- 0591.Tag Validator
- 0599.Minimum Index Sum of Two Lists
- 0600-0699
- 0605.Can Place Flowers
- 0611.Valid Triangle Number
- 0616.Add Bold Tag in String
- 0617.Merge Two Binary Trees
- 0623.Add One Row to Tree
- 0630.Course Schedule III
- 0633.Sum of Square Numbers
- 0636.Exclusive Time of Functions
- 0638.Shopping Offers
- 0646.Maximum Length of Pair Chain
- 0648.Replace Words
- 0658.Find K Closest Elements
- 0661.Image Smoother
- 0662.Maximum Width of Binary Tree
- 0666.Path Sum IV
- 0668.Kth Smallest Number in Multiplication Table
- 0670.Maximum Swap
- 0674.Longest Continuous Increasing Subsequence
- 0675.Cut Off Trees for Golf Event
- 0676.Implement Magic Dictionary
- 0677.Map Sum Pairs
- 0678.Valid Parenthesis String
- 0682.Baseball Game
- 0683.K Empty Slots
- 0684.Redundant Connection
- 0685.Redundant Connection II
- 0686.Repeated String Match
- 0688.Knight Probability in Chessboard
- 0689.Maximum Sum of 3 Non-Overlapping Subarrays
- 0691.Stickers to Spell Word
- 0693.Binary Number with Alternating Bits
- 0694.Number of Distinct Islands
- 0695.Max Area of Island
- 0696.Count Binary Substrings
- 0698.Partition to K Equal Sum Subsets
- 0699.Falling Squares
- 0700-0799
- 0701.Insert into a Binary Search Tree
- 0704.Binary Search
- 0707.Design Linked List
- 0708.Insert into a Sorted Circular Linked List
- 0710.Random Pick with Blacklist
- 0711.Number of Distinct Islands II
- 0712.Minimum ASCII Delete Sum for Two Strings
- 0713.Subarray Product Less Than K
- 0715.Range Module
- 0718.Maximum Length of Repeated Subarray
- 0719.Find K-th Smallest Pair Distance
- 0720.Longest Word in Dictionary
- 0721.Accounts Merge
- 0723.Candy Crush
- 0724.Find Pivot Index
- 0728.Self Dividing Numbers
- 0729.My Calendar I
- 0730.Count Different Palindromic Subsequences
- 0731.My Calendar II
- 0732.My Calendar III
- 0734.Sentence Similarity
- 0736.Parse Lisp Expression
- 0739.Daily Temperatures
- 0741.Cherry Pickup
- 0742.Closest Leaf in a Binary Tree
- 0743.Network Delay Time
- 0745.Prefix and Suffix Search
- 0747.Largest Number At Least Twice of Others
- 0748.Shortest Completing Word
- 0749.Contain Virus
- 0752.Open the Lock
- 0757.Set Intersection Size At Least Two
- 0758.Bold Words in String
- 0761.Special Binary String
- 0762.Prime Number of Set Bits in Binary Representation
- 0763.Partition Labels
- 0765.Couples Holding Hands
- 0767.Reorganize String
- 0768.Max Chunks To Make Sorted II
- 0769.Max Chunks To Make Sorted
- 0773.Sliding Puzzle
- 0778.Swim in Rising Water
- 0780.Reaching Points
- 0784.Letter Case Permutation
- 0785.Is Graph Bipartite
- 0786.K-th Smallest Prime Fraction
- 0787.Cheapest Flights Within K Stops
- 0792.Number of Matching Subsequences
- 0797.All Paths From Source to Target
- 0798.Smallest Rotation with Highest Score
- 0800-0899
- 0802.Find Eventual Safe States
- 0803.Bricks Falling When Hit
- 0804.Unique Morse Code Words
- 0806.Number of Lines To Write String
- 0807.Max Increase to Keep City Skyline
- 0812.Largest Triangle Area
- 0819.Most Common Word
- 0820.Short Encoding of Words
- 0821.Shortest Distance to a Character
- 0825.Friends Of Appropriate Ages
- 0826.Most Profit Assigning Work
- 0827.Making A Large Island
- 0838.Push Dominoes
- 0844.Backspace String Compare
- 0846.Hand of Straights
- 0847.Shortest Path Visiting All Nodes
- 0850.Rectangle Area II
- 0851.Loud and Rich
- 0852.Peak Index in a Mountain Array
- 0854.K-Similar Strings
- 0859.Buddy Strings
- 0860.Lemonade Change
- 0861.Score After Flipping Matrix
- 0862.Shortest Subarray with Sum at Least K
- 0863.All Nodes Distance K in Binary Tree
- 0864.Shortest Path to Get All Keys
- 0866.Prime Palindrome
- 0868.Binary Gap
- 0870.Advantage Shuffle
- 0871.Minimum Number of Refueling Stops
- 0873.Length of Longest Fibonacci Subsequence
- 0874.Walking Robot Simulation
- 0875.Koko Eating Bananas
- 0883.Projection Area of 3D Shapes
- 0885.Spiral Matrix III
- 0886.Possible Bipartition
- 0888.Fair Candy Swap
- 0890.Find and Replace Pattern
- 0893.Groups of Special-Equivalent Strings
- 0896.Monotonic Array
- 0898.Bitwise ORs of Subarrays
- 0899.Orderly Queue
- 0900-0999
- 0900.RLE Iterator
- 0901.Online Stock Span
- 0905.Sort Array By Parity
- 0907.Sum of Subarray Minimums
- 0909.Snakes and Ladders
- 0911.Online Election
- 0912.Sort an Array
- 0913.Cat and Mouse
- 0917.Reverse Only Letters
- 0919.Complete Binary Tree Inserter
- 0921.Minimum Add to Make Parentheses Valid
- 0922.Sort Array By Parity II
- 0924.Minimize Malware Spread
- 0925.Long Pressed Name
- 0927.Three Equal Parts
- 0928.Minimize Malware Spread II
- 0929.Unique Email Addresses
- 0930.Binary Subarrays With Sum
- 0933.Number of Recent Calls
- 0934.Shortest Bridge
- 0935.Knight Dialer
- 0945.Minimum Increment to Make Array Unique
- 0946.Validate Stack Sequences
- 0952.Largest Component Size by Common Factor
- 0953.Verifying an Alien Dictionary
- 0954.Array of Doubled Pairs
- 0958.Check Completeness of a Binary Tree
- 0959.Regions Cut By Slashes
- 0960.Delete Columns to Make Sorted III
- 0961.N-Repeated Element in Size 2N Array
- 0962.Maximum Width Ramp
- 0967.Numbers With Same Consecutive Differences
- 0968.Binary Tree Cameras
- 0969.Pancake Sorting
- 0974.Subarray Sums Divisible by K
- 0976.Largest Perimeter Triangle
- 0985.Sum of Even Numbers After Queries
- 0986.Interval List Intersections
- 0988.Smallest String Starting From Leaf
- 0989.Add to Array-Form of Integer
- 0990.Satisfiability of Equality Equations
- 0993.Cousins in Binary Tree
- 0994.Rotting Oranges
- 0997.Find the Town Judge
- 0999.Available Captures for Rook
- 1000-1099
- 1002.Find Common Characters
- 1004.Max Consecutive Ones III
- 1005.Maximize Sum Of Array After K Negations
- 1008.Construct Binary Search Tree from Preorder Traversal
- 1009.Complement of Base 10 Integer
- 1011.Capacity To Ship Packages Within D Days
- 1020.Number of Enclaves
- 1021.Remove Outermost Parentheses
- 1027.Longest Arithmetic Subsequence
- 1029.Two City Scheduling
- 1030.Matrix Cells in Distance Order
- 1034.Coloring A Border
- 1036.Escape a Large Maze
- 1041.Robot Bounded In Circle
- 1042.Flower Planting With No Adjacent
- 1044.Longest Duplicate Substring
- 1046.Last Stone Weight
- 1048.Longest String Chain
- 1049.Last Stone Weight II
- 1052.Grumpy Bookstore Owner
- 1061.Lexicographically Smallest Equivalent String
- 1065.Index Pairs of a String
- 1072.Flip Columns For Maximum Number of Equal Rows
- 1079.Letter Tile Possibilities
- 1089.Duplicate Zeros
- 1090.Largest Values From Labels
- 1091.Shortest Path in Binary Matrix
- 1094.Car Pooling
- 1100-1199
- 1100.Find K-Length Substrings With No Repeated Characters
- 1101.The Earliest Moment When Everyone Become Friends
- 1102.Path With Maximum Minimum Value
- 1103.Distribute Candies to People
- 1108.Defanging an IP Address
- 1109.Corporate Flight Bookings
- 1111.Maximum Nesting Depth of Two Valid Parentheses Strings
- 1115.Print FooBar Alternately
- 1122.Relative Sort Array
- 1124.Longest Well-Performing Interval
- 1128.Number of Equivalent Domino Pairs
- 1129.Shortest Path with Alternating Colors
- 1135.Connecting Cities With Minimum Cost
- 1136.Parallel Courses
- 1137.N-th Tribonacci Number
- 1143.Longest Common Subsequence
- 1160.Find Words That Can Be Formed by Characters
- 1161.Maximum Level Sum of a Binary Tree
- 1162.As Far from Land as Possible
- 1165.Single-Row Keyboard
- 1167.Minimum Cost to Connect Sticks
- 1168.Optimize Water Distribution in a Village
- 1175.Prime Arrangements
- 1180.Count Substrings with Only One Distinct Letter
- 1184.Distance Between Bus Stops
- 1185.Day of the Week
- 1195.Fizz Buzz Multithreaded
- 1196.How Many Apples Can You Put into the Basket
- 1197.Minimum Knight Moves
- 1200-1299
- 1200.Minimum Absolute Difference
- 1202.Smallest String With Swaps
- 1206.Design Skiplist
- 1208.Get Equal Substrings Within Budget
- 1210.Minimum Moves to Reach Target with Rotations
- 1214.Two Sum BSTs
- 1215.Stepping Numbers
- 1221.Split a String in Balanced Strings
- 1222.Queens That Can Attack the King
- 1226.The Dining Philosophers
- 1228.Missing Number In Arithmetic Progression
- 1230.Toss Strange Coins
- 1236.Web Crawler
- 1245.Tree Diameter
- 1252.Cells with Odd Values in a Matrix
- 1254.Number of Closed Islands
- 1257.Smallest Common Region
- 1260.Shift 2D Grid
- 1261.Find Elements in a Contaminated Binary Tree
- 1267.Count Servers that Communicate
- 1273.Delete Tree Nodes
- 1277.Count Square Submatrices with All Ones
- 1283.Find the Smallest Divisor Given a Threshold
- 1284.Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
- 1286.Iterator for Combination
- 1288.Remove Covered Intervals
- 1292.Maximum Side Length of a Square with Sum Less than or Equal to Threshold
- 1293.Shortest Path in a Grid with Obstacles Elimination
- 1296.Divide Array in Sets of K Consecutive Numbers
- 1298.Maximum Candies You Can Get from Boxes
- 1300-1399
- 1305.All Elements in Two Binary Search Trees
- 1306.Jump Game III
- 1310.XOR Queries of a Subarray
- 1314.Matrix Block Sum
- 1315.Sum of Nodes with Even-Valued Grandparent
- 1316.Distinct Echo Substrings
- 1318.Minimum Flips to Make a OR b Equal to c
- 1319.Number of Operations to Make Network Connected
- 1323.Maximum 69 Number
- 1324.Print Words Vertically
- 1325.Delete Leaves With a Given Value
- 1337.The K Weakest Rows in a Matrix
- 1338.Reduce Array Size to The Half
- 1342.Number of Steps to Reduce a Number to Zero
- 1345.Jump Game IV
- 1347.Minimum Number of Steps to Make Two Strings Anagram
- 1351.Count Negative Numbers in a Sorted Matrix
- 1361.Validate Binary Tree Nodes
- 1366.Rank Teams by Votes
- 1368.Minimum Cost to Make at Least One Valid Path in a Grid
- 1370.Increasing Decreasing String
- 1371.Find the Longest Substring Containing Vowels in Even Counts
- 1375.Number of Times Binary String Is Prefix-Aligned
- 1377.Frog Position After T Seconds
- 1379.Find a Corresponding Node of a Binary Tree in a Clone of That Tree
- 1380.Lucky Numbers in a Matrix
- 1383.Maximum Performance of a Team
- 1386.Cinema Seat Allocation
- 1391.Check if There is a Valid Path in a Grid
- 1392.Longest Happy Prefix
- 1394.Find Lucky Integer in an Array
- 1395.Count Number of Teams
- 1399.Count Largest Group
- 1400-1499
- 1402.Reducing Dishes
- 1403.Minimum Subsequence in Non-Increasing Order
- 1404.Number of Steps to Reduce a Number in Binary Representation to One
- 1408.String Matching in an Array
- 1409.Queries on a Permutation With Key
- 1410.HTML Entity Parser
- 1411.Number of Ways to Paint N × 3 Grid
- 1413.Minimum Value to Get Positive Step by Step Sum
- 1414.Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
- 1415.The k-th Lexicographical String of All Happy Strings of Length n
- 1417.Reformat The String
- 1418.Display Table of Food Orders in a Restaurant
- 1419.Minimum Number of Frogs Croaking
- 1423.Maximum Points You Can Obtain from Cards
- 1425.Constrained Subsequence Sum
- 1428.Leftmost Column with at Least a One
- 1434.Number of Ways to Wear Different Hats to Each Other
- 1441.Build an Array With Stack Operations
- 1442.Count Triplets That Can Form Two Arrays of Equal XOR
- 1443.Minimum Time to Collect All Apples in a Tree
- 1446.Consecutive Characters
- 1448.Count Good Nodes in Binary Tree
- 1457.Pseudo-Palindromic Paths in a Binary Tree
- 1462.Course Schedule IV
- 1463.Cherry Pickup II
- 1466.Reorder Routes to Make All Paths Lead to the City Zero
- 1475.Final Prices With a Special Discount in a Shop
- 1481.Least Number of Unique Integers after K Removals
- 1489.Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree
- 1496.Path Crossing
- 1499.Max Value of Equation
- 1500-1599
- 1505.Minimum Possible Integer After at Most K Adjacent Swaps On Digits
- 1512.Number of Good Pairs
- 1514.Path with Maximum Probability
- 1518.Water Bottles
- 1522.Diameter of N-Ary Tree
- 1524.Number of Sub-arrays With Odd Sum
- 1533.Find the Index of the Large Integer
- 1534.Count Good Triplets
- 1539.Kth Missing Positive Number
- 1546.Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
- 1552.Magnetic Force Between Two Balls
- 1554.Strings Differ by One Character
- 1557.Minimum Number of Vertices to Reach All Nodes
- 1558.Minimum Numbers of Function Calls to Make Target Array
- 1559.Detect Cycles in 2D Grid
- 1560.Most Visited Sector in a Circular Track
- 1561.Maximum Number of Coins You Can Get
- 1562.Find Latest Group of Size M
- 1575.Count All Possible Routes
- 1576.Replace All 's to Avoid Consecutive Repeating Characters
- 1579.Remove Max Number of Edges to Keep Graph Fully Traversable
- 1584.Min Cost to Connect All Points
- 1588.Sum of All Odd Length Subarrays
- 1589.Maximum Sum Obtained of Any Permutation
- 1600-1699
- 1601.Maximum Number of Achievable Transfer Requests
- 1602.Find Nearest Right Node in Binary Tree
- 1605.Find Valid Matrix Given Row and Column Sums
- 1608.Special Array With X Elements Greater Than or Equal X
- 1609.Even Odd Tree
- 1610.Maximum Number of Visible Points
- 1614.Maximum Nesting Depth of the Parentheses
- 1619.Mean of Array After Removing Some Elements
- 1622.Fancy Sequence
- 1625.Lexicographically Smallest String After Applying Operations
- 1626.Best Team With No Conflicts
- 1628.Design an Expression Tree With Evaluate Function
- 1629.Slowest Key
- 1631.Path With Minimum Effort
- 1638.Count Substrings That Differ by One Character
- 1649.Create Sorted Array through Instructions
- 1650.Lowest Common Ancestor of a Binary Tree III
- 1654.Minimum Jumps to Reach Home
- 1658.Minimum Operations to Reduce X to Zero
- 1660.Correct a Binary Tree
- 1668.Maximum Repeating Substring
- 1676.Lowest Common Ancestor of a Binary Tree IV
- 1691.Maximum Height by Stacking Cuboids
- 1697.Checking Existence of Edge Length Limited Paths
- 1698.Number of Distinct Substrings in a String
- 1700-1799
- 1705.Maximum Number of Eaten Apples
- 1706.Where Will the Ball Fall
- 1717.Maximum Score From Removing Substrings
- 1718.Construct the Lexicographically Largest Valid Sequence
- 1719.Number Of Ways To Reconstruct A Tree
- 1720.Decode XORed Array
- 1721.Swapping Nodes in a Linked List
- 1722.Minimize Hamming Distance After Swap Operations
- 1723.Find Minimum Time to Finish All Jobs
- 1725.Number Of Rectangles That Can Form The Largest Square
- 1730.Shortest Path to Get Food
- 1732.Find the Highest Altitude
- 1738.Find Kth Largest XOR Coordinate Value
- 1742.Maximum Number of Balls in a Box
- 1748.Sum of Unique Elements
- 1756.Design Most Recently Used Queue
- 1760.Minimum Limit of Balls in a Bag
- 1763.Longest Nice Substring
- 1765.Map of Highest Peak
- 1775.Equal Sum Arrays With Minimum Number of Operations
- 1781.Sum of Beauty of All Substrings
- 1786.Number of Restricted Paths From First to Last Node
- 1790.Check if One String Swap Can Make Strings Equal
- 1800-1899
- 1813.Sentence Similarity III
- 1818.Minimum Absolute Sum Difference
- 1822.Sign of the Product of an Array
- 1826.Faulty Sensor
- 1827.Minimum Operations to Make the Array Increasing
- 1829.Maximum XOR for Each Query
- 1832.Check if the Sentence Is Pangram
- 1833.Maximum Ice Cream Bars
- 1836.Remove Duplicates From an Unsorted Linked List
- 1838.Frequency of the Most Frequent Element
- 1846.Maximum Element After Decreasing and Rearranging
- 1856.Maximum Subarray Min-Product
- 1857.Largest Color Value in a Directed Graph
- 1858.Longest Word With All Prefixes
- 1869.Longer Contiguous Segments of Ones than Zeros
- 1881.Maximum Value after Insertion
- 1885.Count Pairs in Two Arrays
- 1886.Determine Whether Matrix Can Be Obtained By Rotation
- 1887.Reduction Operations to Make the Array Elements Equal
- 1893.Check if All the Integers in a Range Are Covered
- 1895.Largest Magic Square
- 1900-1999
- 1905.Count Sub Islands
- 1909.Remove One Element to Make the Array Strictly Increasing
- 1915.Number of Wonderful Substrings
- 1922.Count Good Numbers
- 1925.Count Square Sum Triples
- 1926.Nearest Exit from Entrance in Maze
- 1941.Check if All Characters Have Equal Number of Occurrences
- 1942.The Number of the Smallest Unoccupied Chair
- 1943.Describe the Painting
- 1944.Number of Visible People in a Queue
- 1957.Delete Characters to Make Fancy String
- 1958.Check if Move is Legal
- 1959.Minimum Total Space Wasted With K Resizing Operations
- 1961.Check If String Is a Prefix of Array
- 1962.Remove Stones to Minimize the Total
- 1963.Minimum Number of Swaps to Make the String Balanced
- 1964.Find the Longest Valid Obstacle Course at Each Position
- 1967.Number of Strings That Appear as Substrings in Word
- 1968.Array With Elements Not Equal to Average of Neighbors
- 1970.Last Day Where You Can Still Cross
- 1974.Minimum Time to Type Word Using Special Typewriter
- 1976.Number of Ways to Arrive at Destination
- 1979.Find Greatest Common Divisor of Array
- 1980.Find Unique Binary String
- 1991.Find the Middle Index in Array
- 1992.Find All Groups of Farmland
- 1993.Operations on Tree
- 1994.The Number of Good Subsets
- 1996.The Number of Weak Characters in the Game
- 1998.GCD Sort of an Array
- 2000-2099
- 2006.Count Number of Pairs With Absolute Difference K
- 2007.Find Original Array From Doubled Array
- 2012.Sum of Beauty in the Array
- 2013.Detect Squares
- 2016.Maximum Difference Between Increasing Elements
- 2017.Grid Game
- 2021.Brightest Position on Street
- 2022.Convert 1D Array Into 2D Array
- 2023.Number of Pairs of Strings With Concatenation Equal to Target
- 2024.Maximize the Confusion of an Exam
- 2029.Stone Game IX
- 2031.Count Subarrays With More Ones Than Zeros
- 2033.Minimum Operations to Make a Uni-Value Grid
- 2034.Stock Price Fluctuation
- 2035.Partition Array Into Two Arrays to Minimize Sum Difference
- 2038.Remove Colored Pieces if Both Neighbors are the Same Color
- 2039.The Time When the Network Becomes Idle
- 2042.Check if Numbers Are Ascending in a Sentence
- 2044.Count Number of Maximum Bitwise-OR Subsets
- 2046.Sort Linked List Already Sorted Using Absolute Values
- 2048.Next Greater Numerically Balanced Number
- 2049.Count Nodes With the Highest Score
- 2050.Parallel Courses III
- 2052.Minimum Cost to Separate Sentence Into Rows
- 2053.Kth Distinct String in an Array
- 2054.Two Best Non-Overlapping Events
- 2055.Plates Between Candles
- 2058.Find the Minimum and Maximum Number of Nodes Between Critical Points
- 2059.Minimum Operations to Convert Number
- 2062.Count Vowel Substrings of a String
- 2063.Vowels of All Substrings
- 2064.Minimized Maximum of Products Distributed to Any Store
- 2067.Number of Equal Count Substrings
- 2070.Most Beautiful Item for Each Query
- 2076.Process Restricted Friend Requests
- 2079.Watering Plants
- 2083.Substrings That Begin and End With the Same Letter
- 2091.Removing Minimum and Maximum From Array
- 2092.Find All People With Secret
- 2094.Finding 3-Digit Even Numbers
- 2095.Delete the Middle Node of a Linked List
- 2096.Step-By-Step Directions From a Binary Tree Node to Another
- 2100-2199
- 2101.Detonate the Maximum Bombs
- 2103.Rings and Rods
- 2104.Sum of Subarray Ranges
- 2105.Watering Plants II
- 2106.Maximum Fruits Harvested After at Most K Steps
- 2109.Adding Spaces to a String
- 2110.Number of Smooth Descent Periods of a Stock
- 2111.Minimum Operations to Make the Array K-Increasing
- 2120.Execution of All Suffix Instructions Staying in a Grid
- 2121.Intervals Between Identical Elements
- 2122.Recover the Original Array
- 2125.Number of Laser Beams in a Bank
- 2126.Destroying Asteroids
- 2127.Maximum Employees to Be Invited to a Meeting
- 2132.Stamping the Grid
- 2133.Check if Every Row and Column Contains All Numbers
- 2134.Minimum Swaps to Group All 1's Together II
- 2135.Count Words Obtained After Adding a Letter
- 2136.Earliest Possible Day of Full Bloom
- 2138.Divide a String Into Groups of Size k
- 2144.Minimum Cost of Buying Candies With Discount
- 2145.Count the Hidden Sequences
- 2146.K Highest Ranked Items Within a Price Range
- 2148.Count Elements With Strictly Smaller and Greater Elements
- 2149.Rearrange Array Elements by Sign
- 2150.Find All Lonely Numbers in the Array
- 2151.Maximum Good People Based on Statements
- 2155.All Divisions With the Highest Score of a Binary Array
- 2157.Groups of Strings
- 2158.Amount of New Area Painted Each Day
- 2160.Minimum Sum of Four Digit Number After Splitting Digits
- 2161.Partition Array According to Given Pivot
- 2162.Minimum Cost to Set Cooking Time
- 2164.Sort Even and Odd Indices Independently
- 2165.Smallest Value of the Rearranged Number
- 2169.Count Operations to Obtain Zero
- 2170.Minimum Operations to Make the Array Alternating
- 2174.Remove All Ones With Row and Column Flips II
- 2176.Count Equal and Divisible Pairs in an Array
- 2178.Maximum Split of Positive Even Integers
- 2179.Count Good Triplets in an Array
- 2180.Count Integers With Even Digit Sum
- 2181.Merge Nodes in Between Zeros
- 2182.Construct String With Repeat Limit
- 2187.Minimum Time to Complete Trips
- 2190.Most Frequent Number Following Key In an Array
- 2192.All Ancestors of a Node in a Directed Acyclic Graph
- 2193.Minimum Number of Moves to Make Palindrome
- 2195.Append K Integers With Minimal Sum
- 2196.Create Binary Tree From Descriptions
- 2198.Number of Single Divisor Triplets
- 2200-2299
- 2200.Find All K-Distant Indices in an Array
- 2201.Count Artifacts That Can Be Extracted
- 2202.Maximize the Topmost Element After K Moves
- 2207.Maximize Number of Subsequences in a String
- 2208.Minimum Operations to Halve Array Sum
- 2210.Count Hills and Valleys in an Array
- 2211.Count Collisions on a Road
- 2212.Maximum Points in an Archery Competition
- 2213.Longest Substring of One Repeating Character
- 2214.Minimum Health to Beat Game
- 2217.Find Palindrome With Fixed Length
- 2218.Maximum Value of K Coins From Piles
- 2220.Minimum Bit Flips to Convert Number
- 2222.Number of Ways to Select Buildings
- 2224.Minimum Number of Operations to Convert Time
- 2225.Find Players With Zero or One Losses
- 2226.Maximum Candies Allocated to K Children
- 2227.Encrypt and Decrypt Strings
- 2231.Largest Number After Digit Swaps by Parity
- 2233.Maximum Product After K Increments
- 2237.Count Positions on Street With Required Brightness
- 2239.Find Closest Number to Zero
- 2240.Number of Ways to Buy Pens and Pencils
- 2244.Minimum Rounds to Complete All Tasks
- 2249.Count Lattice Points Inside a Circle
- 2250.Count Number of Rectangles Containing Each Point
- 2256.Minimum Average Difference
- 2257.Count Unguarded Cells in the Grid
- 2258.Escape the Spreading Fire
- 2259.Remove Digit From Number to Maximize Result
- 2260.Minimum Consecutive Cards to Pick Up
- 2261.K Divisible Elements Subarrays
- 2262.Total Appeal of A String
- 2264.Largest 3-Same-Digit Number in String
- 2267.Check if There Is a Valid Parentheses String Path
- 2268.Minimum Number of Keypresses
- 2269.Find the K-Beauty of a Number
- 2270.Number of Ways to Split Array
- 2279.Maximum Bags With Full Capacity of Rocks
- 2280.Minimum Lines to Represent a Line Chart
- 2281.Sum of Total Strength of Wizards
- 2283.Check if Number Has Equal Digit Count and Digit Value
- 2284.Sender With Largest Word Count
- 2285.Maximum Total Importance of Roads
- 2287.Rearrange Characters to Make Target String
- 2289.Steps to Make Array Non-decreasing
- 2290.Minimum Obstacle Removal to Reach Corner
- 2291.Maximum Profit From Trading Stocks
- 2293.Min Max Game
- 2294.Partition Array Such That Maximum Difference Is K
- 2295.Replace Elements in an Array
- 2299.Strong Password Checker II
- 2300-2399
- 2300.Successful Pairs of Spells and Potions
- 2301.Match Substring After Replacement
- 2302.Count Subarrays With Score Less Than K
- 2303.Calculate Amount Paid in Taxes
- 2304.Minimum Path Cost in a Grid
- 2305.Fair Distribution of Cookies
- 2306.Naming a Company
- 2310.Sum of Numbers With Units Digit K
- 2311.Longest Binary Subsequence Less Than or Equal to K
- 2315.Count Asterisks
- 2316.Count Unreachable Pairs of Nodes in an Undirected Graph
- 2319.Check if Matrix Is X-Matrix
- 2320.Count Number of Ways to Place Houses
- 2321.Maximum Score Of Spliced Array
- 2322.Minimum Score After Removals on a Tree
- 2325.Decode the Message
- 2326.Spiral Matrix IV
- 2327.Number of People Aware of a Secret
- 2328.Number of Increasing Paths in a Grid
- 2332.The Latest Time to Catch a Bus
- 2333.Minimum Sum of Squared Difference
- 2334.Subarray With Elements Greater Than Varying Threshold
- 2335.Minimum Amount of Time to Fill Cups
- 2336.Smallest Number in Infinite Set
- 2337.Move Pieces to Obtain a String
- 2342.Max Sum of a Pair With Equal Sum of Digits
- 2344.Minimum Deletions to Make Array Divisible
- 2347.Best Poker Hand
- 2348.Number of Zero-Filled Subarrays
- 2349.Design a Number Container System
- 2350.Shortest Impossible Sequence of Rolls
- 2351.First Letter to Appear Twice
- 2353.Design a Food Rating System
- 2354.Number of Excellent Pairs
- 2355.Maximum Number of Books You Can Take
- 2357.Make Array Zero by Subtracting Equal Amounts
- 2358.Maximum Number of Groups Entering a Competition
- 2360.Longest Cycle in a Graph
- 2363.Merge Similar Items
- 2365.Task Scheduler II
- 2366.Minimum Replacements to Sort the Array
- 2368.Reachable Nodes With Restrictions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,663 files changed
+6117
-9051
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
| 152 | + | |
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
| 151 | + | |
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 |
| - | |
174 | 173 |
| |
175 | 174 |
| |
176 | 175 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
216 |
| - | |
| 215 | + | |
217 | 216 |
| |
218 |
| - | |
219 |
| - | |
| 217 | + | |
220 | 218 |
| |
221 |
| - | |
222 |
| - | |
| 219 | + | |
223 | 220 |
| |
224 | 221 |
| |
225 | 222 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
170 |
| - | |
171 |
| - | |
| 170 | + | |
172 | 171 |
| |
173 | 172 |
| |
174 |
| - | |
175 |
| - | |
| 173 | + | |
176 | 174 |
| |
177 | 175 |
| |
178 |
| - | |
179 |
| - | |
180 |
| - | |
| 176 | + | |
181 | 177 |
| |
182 | 178 |
| |
183 | 179 |
| |
|
+41-7
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
2 | 3 |
| |
3 | 4 |
| |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
| 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 | |
---|---|---|---|
| |||
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
262 |
| - | |
| 262 | + | |
263 | 263 |
| |
264 |
| - | |
265 |
| - | |
| 264 | + | |
266 | 265 |
| |
267 |
| - | |
268 |
| - | |
| 266 | + | |
269 | 267 |
| |
270 | 268 |
| |
271 |
| - | |
272 |
| - | |
| 269 | + | |
273 | 270 |
| |
274 |
| - | |
275 |
| - | |
| 271 | + | |
276 | 272 |
| |
277 | 273 |
| |
278 | 274 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 |
| - | |
| 213 | + | |
214 | 214 |
| |
215 |
| - | |
216 |
| - | |
| 215 | + | |
217 | 216 |
| |
218 |
| - | |
219 |
| - | |
| 217 | + | |
220 | 218 |
| |
221 | 219 |
| |
222 |
| - | |
223 |
| - | |
| 220 | + | |
224 | 221 |
| |
225 |
| - | |
226 |
| - | |
| 222 | + | |
227 | 223 |
| |
228 | 224 |
| |
229 | 225 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
| 158 | + | |
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
165 |
| - | |
| 164 | + | |
166 | 165 |
| |
167 | 166 |
| |
168 |
| - | |
169 |
| - | |
| 167 | + | |
170 | 168 |
| |
171 | 169 |
| |
172 |
| - | |
173 |
| - | |
174 |
| - | |
| 170 | + | |
175 | 171 |
| |
176 | 172 |
| |
177 | 173 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
135 |
| - | |
| 135 | + | |
136 | 136 |
| |
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
142 |
| - | |
| 141 | + | |
143 | 142 |
| |
144 | 143 |
| |
145 |
| - | |
146 |
| - | |
| 144 | + | |
147 | 145 |
| |
148 | 146 |
| |
149 |
| - | |
150 |
| - | |
151 |
| - | |
| 147 | + | |
152 | 148 |
| |
153 | 149 |
| |
154 | 150 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
218 |
| - | |
| 217 | + | |
219 | 218 |
| |
220 | 219 |
| |
221 | 220 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
192 |
| - | |
193 |
| - | |
| 192 | + | |
194 | 193 |
| |
195 | 194 |
| |
196 | 195 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
158 |
| - | |
| 157 | + | |
159 | 158 |
| |
160 | 159 |
| |
161 | 160 |
| |
162 | 161 |
| |
163 | 162 |
| |
164 |
| - | |
| 163 | + | |
| 164 | + | |
165 | 165 |
| |
166 |
| - | |
167 |
| - | |
| 166 | + | |
168 | 167 |
| |
169 | 168 |
| |
170 | 169 |
| |
171 |
| - | |
| 170 | + | |
| 171 | + | |
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
146 |
| - | |
| 145 | + | |
147 | 146 |
| |
148 | 147 |
| |
149 | 148 |
| |
150 | 149 |
| |
151 | 150 |
| |
152 |
| - | |
| 151 | + | |
| 152 | + | |
153 | 153 |
| |
154 |
| - | |
155 |
| - | |
| 154 | + | |
156 | 155 |
| |
157 | 156 |
| |
158 | 157 |
| |
159 |
| - | |
| 158 | + | |
| 159 | + | |
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
259 |
| - | |
| 258 | + | |
260 | 259 |
| |
261 | 260 |
| |
262 | 261 |
| |
| |||
265 | 264 |
| |
266 | 265 |
| |
267 | 266 |
| |
268 |
| - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
272 |
| - | |
273 |
| - | |
| 273 | + | |
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
222 |
| - | |
| 221 | + | |
223 | 222 |
| |
224 | 223 |
| |
225 | 224 |
| |
| |||
228 | 227 |
| |
229 | 228 |
| |
230 | 229 |
| |
231 |
| - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
232 | 233 |
| |
233 | 234 |
| |
234 | 235 |
| |
235 |
| - | |
236 |
| - | |
| 236 | + | |
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
179 |
| - | |
180 |
| - | |
| 179 | + | |
181 | 180 |
| |
182 | 181 |
| |
183 |
| - | |
184 |
| - | |
| 182 | + | |
185 | 183 |
| |
186 | 184 |
| |
187 | 185 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
155 |
| - | |
| 154 | + | |
156 | 155 |
| |
157 | 156 |
| |
158 |
| - | |
159 |
| - | |
| 157 | + | |
160 | 158 |
| |
161 | 159 |
| |
162 | 160 |
| |
|
0 commit comments