Collection of Leetcode interview coding questions and solutions by AlgoAdvance.com
673. Number of Longest Increasing Subsequence 3206. Alternating Groups I 1408. String Matching in an Array 703. Kth Largest Element in a Stream 1304. Find N Unique Integers Sum up to Zero 143. Reorder List 1342. Number of Steps to Reduce a Number to Zero 1534. Count Good Triplets 2729. Check if The Number is Fascinating 430. Flatten a Multilevel Doubly Linked List 371. Sum of Two Integers 138. Copy List with Random Pointer 1796. Second Largest Digit in a String 13. Roman to Integer 1848. Minimum Distance to the Target Element 743. Network Delay Time 28. Find the Index of the First Occurrence in a String 1122. Relative Sort Array 380. Insert Delete GetRandom O(1) 1961. Check If String Is a Prefix of Array 542. 01 Matrix 11. Container With Most Water 2148. Count Elements With Strictly Smaller and Greater Elements 142. Linked List Cycle II 112. Path Sum 812. Largest Triangle Area 1436. Destination City 2540. Minimum Common Value 2319. Check if Matrix Is X-Matrix 448. Find All Numbers Disappeared in an Array 999. Available Captures for Rook 14. Longest Common Prefix 809. Expressive Words 623. Add One Row to Tree 823. Binary Trees With Factors 654. Maximum Binary Tree 200. Number of Islands 81. Search in Rotated Sorted Array II 2864. Maximum Odd Binary Number 1716. Calculate Money in Leetcode Bank 744. Find Smallest Letter Greater Than Target 652. Find Duplicate Subtrees 2788. Split Strings by Separator 2239. Find Closest Number to Zero 423. Reconstruct Original Digits from English 443. String Compression 1184. Distance Between Bus Stops 209. Minimum Size Subarray Sum 236. Lowest Common Ancestor of a Binary Tree 556. Next Greater Element III 1523. Count Odd Numbers in an Interval Range 373. Find K Pairs with Smallest Sums 832. Flipping an Image 475. Heaters 3127. Make a Square with the Same Color 238. Product of Array Except Self 831. Masking Personal Information 2869. Minimum Operations to Collect Elements 1720. Decode XORed Array 70. Climbing Stairs 904. Fruit Into Baskets 1566. Detect Pattern of Length M Repeated K or More Times 1207. Unique Number of Occurrences 171. Excel Sheet Column Number 242. Valid Anagram 2446. Determine if Two Events Have Conflict 122. Best Time to Buy and Sell Stock II 24. Swap Nodes in Pairs 3158. Find the XOR of Numbers Which Appear Twice 888. Fair Candy Swap 1154. Day of the Year 622. Design Circular Queue 856. Score of Parentheses 331. Verify Preorder Serialization of a Binary Tree 2341. Maximum Number of Pairs in Array 2894. Divisible and Non-divisible Sums Difference 204. Count Primes 3232. Find if Digit Game Can Be Won 394. Decode String 938. Range Sum of BST 896. Monotonic Array 910. Smallest Range II 173. Binary Search Tree Iterator 3142. Check if Grid Satisfies Conditions 222. Count Complete Tree Nodes 148. Sort List 859. Buddy Strings 405. Convert a Number to Hexadecimal 385. Mini Parser 752. Open the Lock 2469. Convert the Temperature 2520. Count the Digits That Divide a Number 2220. Minimum Bit Flips to Convert Number 2427. Number of Common Factors 283. Move Zeroes 901. Online Stock Span 289. Game of Life 2006. Count Number of Pairs With Absolute Difference K 756. Pyramid Transition Matrix 207. Course Schedule 540. Single Element in a Sorted Array 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence 520. Detect Capital 1464. Maximum Product of Two Elements in an Array 515. Find Largest Value in Each Tree Row 2108. Find First Palindromic String in the Array 1287. Element Appearing More Than 25% In Sorted Array 2418. Sort the People 2085. Count Common Words With One Occurrence 678. Valid Parenthesis String 190. Reverse Bits 713. Subarray Product Less Than K 1576. Replace All ?’s to Avoid Consecutive Repeating Characters 1837. Sum of Digits in Base K 1603. Design Parking System 2363. Merge Similar Items 2437. Number of Valid Clock Times 2367. Number of Arithmetic Triplets 3046. Split the Array 605. Can Place Flowers 700. Search in a Binary Search Tree 2908. Minimum Sum of Mountain Triplets I 806. Number of Lines To Write String 1351. Count Negative Numbers in a Sorted Matrix 893. Groups of Special-Equivalent Strings 1694. Reformat Phone Number 393. UTF-8 Validation 640. Solve the Equation 572. Subtree of Another Tree 160. Intersection of Two Linked Lists 1672. Richest Customer Wealth 554. Brick Wall 3120. Count the Number of Special Characters I 2511. Maximum Enemy Forts That Can Be Captured 2696. Minimum String Length After Removing Substrings 2716. Minimize String Length 395. Longest Substring with At Least K Repeating Characters 22. Generate Parentheses 3065. Minimum Operations to Exceed Threshold Value I 989. Add to Array-Form of Integer 628. Maximum Product of Three Numbers 449. Serialize and Deserialize BST 1047. Remove All Adjacent Duplicates In String 299. Bulls and Cows 507. Perfect Number 2566. Maximum Difference by Remapping a Digit 66. Plus One 2455. Average Value of Even Numbers That Are Divisible by Three 92. Reverse Linked List II 1876. Substrings of Size Three with Distinct Characters 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree 649. Dota2 Senate 648. Replace Words 2451. Odd String Difference 576. Out of Boundary Paths 563. Binary Tree Tilt 205. Isomorphic Strings 3200. Maximum Height of a Triangle 2956. Find Common Elements Between Two Arrays 43. Multiply Strings 438. Find All Anagrams in a String 783. Minimum Distance Between BST Nodes 1009. Complement of Base 10 Integer 837. New 21 Game 873. Length of Longest Fibonacci Subsequence 1544. Make The String Great 2465. Number of Distinct Averages 1790. Check if One String Swap Can Make Strings Equal 1394. Find Lucky Integer in an Array 61. Rotate List 551. Student Attendance Record I 427. Construct Quad Tree 93. Restore IP Addresses 412. Fizz Buzz 2660. Determine the Winner of a Bowling Game 669. Trim a Binary Search Tree 1108. Defanging an IP Address 34. Find First and Last Position of Element in Sorted Array 2558. Take Gifts From the Richest Pile 91. Decode Ways 2000. Reverse Prefix of Word 90. Subsets II 3238. Find the Number of Winning Players 781. Rabbits in Forest 1128. Number of Equivalent Domino Pairs 144. Binary Tree Preorder Traversal 633. Sum of Square Numbers 2016. Maximum Difference Between Increasing Elements 453. Minimum Moves to Equal Array Elements 2357. Make Array Zero by Subtracting Equal Amounts 1844. Replace All Digits with Characters 898. Bitwise ORs of Subarrays 307. Range Sum Query - Mutable 419. Battleships in a Board 1832. Check if the Sentence Is Pangram 1913. Maximum Product Difference Between Two Pairs 473. Matchsticks to Square 557. Reverse Words in a String III 2099. Find Subsequence of Length K With the Largest Sum 1967. Number of Strings That Appear as Substrings in Word 2062. Count Vowel Substrings of a String 1528. Shuffle String 445. Add Two Numbers II 2744. Find Maximum Number of String Pairs 2164. Sort Even and Odd Indices Independently 671. Second Minimum Node In a Binary Tree 1175. Prime Arrangements 77. Combinations 2697. Lexicographically Smallest Palindrome 211. Design Add and Search Words Data Structure 909. Snakes and Ladders 1313. Decompress Run-Length Encoded List 437. Path Sum III 3105. Longest Strictly Increasing or Strictly Decreasing Subarray 1491. Average Salary Excluding the Minimum and Maximum Salary 169. Majority Element 638. Shopping Offers 3095. Shortest Subarray With OR at Least K I 2586. Count the Number of Vowel Strings in Range 79. Word Search 925. Long Pressed Name 637. Average of Levels in Binary Tree 319. Bulb Switcher 100. Same Tree 720. Longest Word in Dictionary 145. Binary Tree Postorder Traversal 529. Minesweeper 2806. Account Balance After Rounded Purchase 795. Number of Subarrays with Bounded Maximum googlead2c46cdbfa0e008 2843. Count Symmetric Integers 889. Construct Binary Tree from Preorder and Postorder Traversal 606. Construct String from Binary Tree 1025. Divisor Game 322. Coin Change 234. Palindrome Linked List 199. Binary Tree Right Side View 452. Minimum Number of Arrows to Burst Balloons 1800. Maximum Ascending Subarray Sum 746. Min Cost Climbing Stairs 1275. Find Winner on a Tic Tac Toe Game 3146. Permutation Difference between Two Strings 468. Validate IP Address 303. Range Sum Query - Immutable 350. Intersection of Two Arrays II 731. My Calendar II 9. Palindrome Number 844. Backspace String Compare 543. Diameter of Binary Tree 349. Intersection of Two Arrays 826. Most Profit Assigning Work 1103. Distribute Candies to People 2644. Find the Maximum Divisibility Score 49. Group Anagrams 2303. Calculate Amount Paid in Taxes 258. Add Digits 2739. Total Distance Traveled 2535. Difference Between Element Sum and Digit Sum of an Array 279. Perfect Squares 2185. Counting Words With a Given Prefix 592. Fraction Addition and Subtraction 2073. Time Needed to Buy Tickets 501. Find Mode in Binary Search Tree 833. Find And Replace in String 738. Monotone Increasing Digits 378. Kth Smallest Element in a Sorted Matrix 2970. Count the Number of Incremovable Subarrays I 717. 1-bit and 2-bit Characters 1399. Count Largest Group 35. Search Insert Position 416. Partition Equal Subset Sum 504. Base 7 680. Valid Palindrome II 1309. Decrypt String from Alphabet to Integer Mapping 655. Print Binary Tree 503. Next Greater Element II 754. Reach a Number 109. Convert Sorted List to Binary Search Tree 874. Walking Robot Simulation 1893. Check if All the Integers in a Range Are Covered 658. Find K Closest Elements 3151. Special Array I 328. Odd Even Linked List 2899. Last Visited Integers 3216. Lexicographically Smallest String After a Swap 1624. Largest Substring Between Two Equal Characters 3069. Distribute Elements Into Two Arrays I 848. Shifting Letters 1232. Check If It Is a Straight Line 496. Next Greater Element I 914. X of a Kind in a Deck of Cards 40. Combination Sum II 309. Best Time to Buy and Sell Stock with Cooldown 1880. Check if Word Equals Summation of Two Words 706. Design HashMap 470. Implement Rand10() Using Rand7() 735. Asteroid Collision 1403. Minimum Subsequence in Non-Increasing Order 367. Valid Perfect Square 1656. Design an Ordered Stream 104. Maximum Depth of Binary Tree 2928. Distribute Candies Among Children I 729. My Calendar I 2409. Count Days Spent Together 2047. Number of Valid Words in a Sentence 880. Decoded String at Index 659. Split Array into Consecutive Subsequences 2798. Number of Employees Who Met the Target 48. Rotate Image 516. Longest Palindromic Subsequence 941. Valid Mountain Array 47. Permutations II 342. Power of Four 96. Unique Binary Search Trees 151. Reverse Words in a String 740. Delete and Earn 845. Longest Mountain in Array 2903. Find Indices With Index and Value Difference I 424. Longest Repeating Character Replacement 1002. Find Common Characters 662. Maximum Width of Binary Tree 107. Binary Tree Level Order Traversal II 2859. Sum of Values at Indices With K Set Bits 2900. Longest Unequal Adjacent Groups Subsequence I 21. Merge Two Sorted Lists 559. Maximum Depth of N-ary Tree 450. Delete Node in a BST 692. Top K Frequent Words 485. Max Consecutive Ones 447. Number of Boomerangs 398. Random Pick Index 59. Spiral Matrix II 525. Contiguous Array 799. Champagne Tower 509. Fibonacci Number 1512. Number of Good Pairs 953. Verifying an Alien Dictionary 50. Pow(x, n) 94. Binary Tree Inorder Traversal 455. Assign Cookies 682. Baseball Game 137. Single Number II 324. Wiggle Sort II 334. Increasing Triplet Subsequence 167. Two Sum II - Input Array Is Sorted 922. Sort Array By Parity II 2269. Find the K-Beauty of a Number 2652. Sum Multiples 2042. Check if Numbers Are Ascending in a Sentence 18. 4Sum 792. Number of Matching Subsequences 1859. Sorting the Sentence 846. Hand of Straights 2824. Count Pairs Whose Sum is Less than Target 641. Design Circular Deque 347. Top K Frequent Elements 1560. Most Visited Sector in a Circular Track 1290. Convert Binary Number in a Linked List to Integer 229. Majority Element II 2068. Check Whether Two Strings are Almost Equivalent 794. Valid Tic-Tac-Toe State 202. Happy Number 2094. Finding 3-Digit Even Numbers 1935. Maximum Number of Words You Can Type 684. Redundant Connection 80. Remove Duplicates from Sorted Array II 1779. Find Nearest Point That Has the Same X or Y Coordinate 111. Minimum Depth of Binary Tree 2570. Merge Two 2D Arrays by Summing Values 2309. Greatest English Letter in Upper and Lower Case 2733. Neither Minimum nor Maximum 7. Reverse Integer 712. Minimum ASCII Delete Sum for Two Strings 646. Maximum Length of Pair Chain 125. Valid Palindrome 494. Target Sum 3099. Harshad Number 787. Cheapest Flights Within K Stops 1160. Find Words That Can Be Formed by Characters 785. Is Graph Bipartite? 1370. Increasing Decreasing String 388. Longest Absolute File Path 676. Implement Magic Dictionary 2965. Find Missing and Repeated Values 1360. Number of Days Between Two Dates 2243. Calculate Digit Sum of a String 547. Number of Provinces 2248. Intersection of Multiple Arrays 942. DI String Match 387. First Unique Character in a String 3190. Find Minimum Operations to Make All Elements Divisible by Three 2595. Number of Even and Odd Bits 2769. Find the Maximum Achievable Number 1385. Find the Distance Value Between Two Arrays 865. Smallest Subtree with all the Deepest Nodes 739. Daily Temperatures 263. Ugly Number 807. Max Increase to Keep City Skyline 2960. Count Tested Devices After Test Operations 399. Evaluate Division 119. Pascal’s Triangle II 725. Split Linked List in Parts 33. Search in Rotated Sorted Array 376. Wiggle Subsequence 885. Spiral Matrix III 164. Maximum Gap 54. Spiral Matrix 835. Image Overlap 539. Minimum Time Difference 900. RLE Iterator 661. Image Smoother 482. License Key Formatting 674. Longest Continuous Increasing Subsequence 2529. Maximum Count of Positive Integer and Negative Integer 235. Lowest Common Ancestor of a Binary Search Tree 98. Validate Binary Search Tree 836. Rectangle Overlap 6. Zigzag Conversion 481. Magical String 365. Water and Jug Problem 82. Remove Duplicates from Sorted List II 598. Range Addition II 670. Maximum Swap 2815. Max Pair Sum in an Array 796. Rotate String 2231. Largest Number After Digit Swaps by Parity 519. Random Flip Matrix 1979. Find Greatest Common Divisor of Array 594. Longest Harmonious Subsequence 677. Map Sum Pairs 131. Palindrome Partitioning 454. 4Sum II 1646. Get Maximum in Generated Array 1295. Find Numbers with Even Number of Digits 2917. Find the K-or of an Array 3184. Count Pairs That Form a Complete Day I 2011. Final Value of Variable After Performing Operations 2200. Find All K-Distant Indices in an Array 567. Permutation in String 657. Robot Return to Origin 1668. Maximum Repeating Substring 1619. Mean of Array After Removing Some Elements 2124. Check if All A’s Appears Before All B’s 1089. Duplicate Zeros 337. House Robber III 2670. Find the Distinct Difference Array 1678. Goal Parser Interpretation 997. Find the Town Judge 523. Continuous Subarray Sum 130. Surrounded Regions 611. Valid Triangle Number 701. Insert into a Binary Search Tree 1748. Sum of Unique Elements 72. Edit Distance 2383. Minimum Hours of Training to Win a Competition 1417. Reformat The String 2032. Two Out of Three 495. Teemo Attacking 2441. Largest Positive Integer That Exists With Its Negative 1886. Determine Whether Matrix Can Be Obtained By Rotation 451. Sort Characters By Frequency 134. Gas Station 2873. Maximum Value of an Ordered Triplet I 457. Circular Array Loop 201. Bitwise AND of Numbers Range 1018. Binary Prefix Divisible By 5 2278. Percentage of Letter in String 2053. Kth Distinct String in an Array 103. Binary Tree Zigzag Level Order Traversal 2913. Subarrays Distinct Element Sum of Squares I 524. Longest Word in Dictionary through Deleting 565. Array Nesting 886. Possible Bipartition 56. Merge Intervals 36. Valid Sudoku 198. House Robber 225. Implement Stack using Queues 3010. Divide an Array Into Subarrays With Minimum Cost I 2379. Minimum Recolors to Get K Consecutive Black Blocks 976. Largest Perimeter Triangle 728. Self Dividing Numbers 860. Lemonade Change 791. Custom Sort String 1437. Check If All 1’s Are at Least Length K Places Away 1200. Minimum Absolute Difference 155. Min Stack 1925. Count Square Sum Triples 128. Longest Consecutive Sequence 240. Search a 2D Matrix II 721. Accounts Merge 1784. Check if Binary String Has at Most One Segment of Ones 2119. A Number After a Double Reversal 71. Simplify Path 491. Non-decreasing Subsequences 313. Super Ugly Number 343. Integer Break 1137. N-th Tribonacci Number 2765. Longest Alternating Subarray 786. K-th Smallest Prime Fraction 2057. Smallest Index With Equal Value 775. Global and Local Inversions 892. Surface Area of 3D Shapes 2481. Minimum Cuts to Divide a Circle 53. Maximum Subarray 2224. Minimum Number of Operations to Convert Time 2235. Add Two Integers 39. Combination Sum 203. Remove Linked List Elements 12. Integer to Roman 1317. Convert Integer to the Sum of Two No-Zero Integers 95. Unique Binary Search Trees II 117. Populating Next Right Pointers in Each Node II 3028. Ant on the Boundary 2833. Furthest Point From Origin 1486. XOR Operation in an Array 257. Binary Tree Paths 1929. Concatenation of Array 1588. Sum of All Odd Length Subarrays 101. Symmetric Tree 2553. Separate the Digits in an Array 118. Pascal’s Triangle 1422. Maximum Score After Splitting a String 583. Delete Operation for Two Strings 97. Interleaving String 462. Minimum Moves to Equal Array Elements II 1920. Build Array from Permutation 99. Recover Binary Search Tree 216. Combination Sum III 1991. Find the Middle Index in Array 2154. Keep Multiplying Found Values by Two 869. Reordered Power of 2 217. Contains Duplicate 108. Convert Sorted Array to Binary Search Tree 1863. Sum of All Subset XOR Totals 537. Complex Number Multiplication 929. Unique Email Addresses 3210. Find the Encrypted String 2643. Row With Maximum Ones 3248. Snake in Matrix 2760. Longest Even Odd Subarray With Threshold 384. Shuffle an Array 2614. Prime In Diagonal 508. Most Frequent Subtree Sum 141. Linked List Cycle 1030. Matrix Cells in Distance Order 2169. Count Operations to Obtain Zero 1299. Replace Elements with Greatest Element on Right Side 2946. Matrix Similarity After Cyclic Shifts 3174. Clear Digits 3242. Design Neighbor Sum Service 153. Find Minimum in Rotated Sorted Array 2160. Minimum Sum of Four Digit Number After Splitting Digits 653. Two Sum IV - Input is a BST 733. Flood Fill 19. Remove Nth Node From End of List 2138. Divide a String Into Groups of Size k 162. Find Peak Element 152. Maximum Product Subarray 530. Minimum Absolute Difference in BST 2460. Apply Operations to an Array 1005. Maximize Sum Of Array After K Negations 417. Pacific Atlantic Water Flow 907. Sum of Subarray Minimums 75. Sort Colors 581. Shortest Unsorted Continuous Subarray 1984. Minimum Difference Between Highest and Lowest of K Scores 415. Add Strings 872. Leaf-Similar Trees 814. Binary Tree Pruning 2255. Count Prefixes of a Given String 264. Ugly Number II 3222. Find the Winning Player in Coin Game 1854. Maximum Population Year 300. Longest Increasing Subsequence 227. Basic Calculator II 1941. Check if All Characters Have Equal Number of Occurrences 105. Construct Binary Tree from Preorder and Inorder Traversal 1710. Maximum Units on a Truck 650. 2 Keys Keyboard 566. Reshape the Matrix 478. Generate Random Point in a Circle 1688. Count of Matches in Tournament 413. Arithmetic Slices 908. Smallest Range I 467. Unique Substrings in Wraparound String 2283. Check if Number Has Equal Digit Count and Digit Value 861. Score After Flipping Matrix 304. Range Sum Query 2D - Immutable 116. Populating Next Right Pointers in Each Node 1791. Find Center of Star Graph 338. Counting Bits 1037. Valid Boomerang 374. Guess Number Higher or Lower 2600. K Items With the Maximum Sum 777. Swap Adjacent in LR String 526. Beautiful Arrangement 2389. Longest Subsequence With Limited Sum 129. Sum Root to Leaf Numbers 2980. Check if Bitwise OR Has Trailing Zeros 1909. Remove One Element to Make the Array Strictly Increasing 106. Construct Binary Tree from Inorder and Postorder Traversal 231. Power of Two 849. Maximize Distance to Closest Person 1763. Longest Nice Substring 375. Guess Number Higher or Lower II 2605. Form Smallest Number From Two Digit Arrays 724. Find Pivot Index 599. Minimum Index Sum of Two Lists 2325. Decode the Message 1752. Check if Array Is Sorted and Rotated 3074. Apple Redistribution into Boxes 274. H-Index 345. Reverse Vowels of a String 1945. Sum of Digits of String After Convert 2114. Maximum Number of Words Found in Sentences 392. Is Subsequence 136. Single Number 1725. Number Of Rectangles That Can Form The Largest Square 1629. Slowest Key 2335. Minimum Amount of Time to Fill Cups 1332. Remove Palindromic Subsequences 150. Evaluate Reverse Polish Notation 1323. Maximum 69 Number 513. Find Bottom Left Tree Value 779. K-th Symbol in Grammar 442. Find All Duplicates in an Array 2778. Sum of Squares of Special Elements 62. Unique Paths 382. Linked List Random Node 172. Factorial Trailing Zeroes 287. Find the Duplicate Number 2656. Maximum Sum With Exactly K Elements 705. Design HashSet 763. Partition Labels 8. String to Integer (atoi) 1185. Day of the Week 636. Exclusive Time of Functions 215. Kth Largest Element in an Array 2839. Check if Strings Can be Made Equal With Operations I 2399. Check Distances Between Same Letters 221. Maximal Square 476. Number Complement 45. Jump Game II 3000. Maximum Area of Longest Diagonal Rectangle 522. Longest Uncommon Subsequence II 2496. Maximum Value of a String in an Array 1260. Shift 2D Grid 696. Count Binary Substrings 429. N-ary Tree Level Order Traversal 647. Palindromic Substrings 1221. Split a String in Balanced Strings 881. Boats to Save People 797. All Paths From Source to Target 961. N-Repeated Element in Size 2N Array 2710. Remove Trailing Zeros From a String 1189. Maximum Number of Balloons 808. Soup Servings 102. Binary Tree Level Order Traversal 1957. Delete Characters to Make Fancy String 693. Binary Number with Alternating Bits 477. Total Hamming Distance 441. Arranging Coins 389. Find the Difference 686. Repeated String Match 1742. Maximum Number of Balls in a Box 241. Different Ways to Add Parentheses 459. Repeated Substring Pattern 1470. Shuffle the Array 2942. Find Words Containing Character 811. Subdomain Visit Count 2129. Capitalize the Title 672. Bulb Switcher II 2144. Minimum Cost of Buying Candies With Discount 383. Ransom Note 2500. Delete Greatest Value in Each Row 26. Remove Duplicates from Sorted Array 1518. Water Bottles 1897. Redistribute Characters to Make All Strings Equal 396. Rotate Function 853. Car Fleet 1971. Find if Path Exists in Graph 769. Max Chunks To Make Sorted 2748. Number of Beautiful Pairs 2176. Count Equal and Divisible Pairs in an Array 406. Queue Reconstruction by Height 870. Advantage Shuffle 1640. Check Array Formation Through Concatenation 2331. Evaluate Boolean Binary Tree 1021. Remove Outermost Parentheses 3090. Maximum Length Substring With Two Occurrences 506. Relative Ranks 474. Ones and Zeroes 3162. Find the Number of Good Pairs I 290. Word Pattern 114. Flatten Binary Tree to Linked List 3038. Maximum Number of Operations With the Same Score I 492. Construct the Rectangle 2578. Split With Minimum Sum 2515. Shortest Distance to Target String in a Circular Array 767. Reorganize String 789. Escape The Ghosts 110. Balanced Binary Tree 191. Number of 1 Bits 977. Squares of a Sorted Array 1704. Determine if String Halves Are Alike 1071. Greatest Common Divisor of Strings 3019. Number of Changing Keys 824. Goat Latin 2784. Check if Array is Good 2485. Find the Pivot Integer 2810. Faulty Keyboard 2315. Count Asterisks 1952. Three Divisors 762. Prime Number of Set Bits in Binary Representation 2413. Smallest Even Multiple 46. Permutations 1450. Number of Students Doing Homework at a Given Time 2. Add Two Numbers 260. Single Number III 822. Card Flipping Game 1637. Widest Vertical Area Between Two Points Containing No Points 707. Design Linked List 1614. Maximum Nesting Depth of the Parentheses 3226. Number of Bit Changes to Make Two Integers Equal 74. Search a 2D Matrix 2293. Min Max Game 498. Diagonal Traverse 1732. Find the Highest Altitude 1281. Subtract the Product and Sum of Digits of an Integer 1608. Special Array With X Elements Greater Than or Equal X 819. Most Common Word 2264. Largest 3-Same-Digit Number in String 687. Longest Univalue Path 621. Task Scheduler 764. Largest Plus Sign 2404. Most Frequent Even Element 593. Valid Square 905. Sort Array By Parity 560. Subarray Sum Equals K 120. Triangle 2027. Minimum Moves to Convert String 858. Mirror Reflection 817. Linked List Components 3. Longest Substring Without Repeating Characters 876. Middle of the Linked List 645. Set Mismatch 2210. Count Hills and Valleys in an Array 521. Longest Uncommon Subsequence I 816. Ambiguous Coordinates 3014. Minimum Number of Pushes to Type Word I 38. Count and Say 268. Missing Number 1556. Thousand Separator 2259. Remove Digit From Number to Maximize Result 16. 3Sum Closest 179. Largest Number 166. Fraction to Recurring Decimal 27. Remove Element 1252. Cells with Odd Values in a Matrix 897. Increasing Order Search Tree 1636. Sort Array by Increasing Frequency 306. Additive Number 397. Integer Replacement 421. Maximum XOR of Two Numbers in an Array 2828. Check if a String Is an Acronym of Words 1480. Running Sum of 1d Array 1446. Consecutive Characters 1502. Can Make Arithmetic Progression From Sequence 69. Sqrt(x) 2133. Check if Every Row and Column Contains All Numbers 1572. Matrix Diagonal Sum 86. Partition List 944. Delete Columns to Make Sorted 88. Merge Sorted Array 2490. Circular Sentence 1346. Check If N and Its Double Exist 3131. Find the Integer Added to Array I 883. Projection Area of 3D Shapes 147. Insertion Sort List 830. Positions of Large Groups 2432. The Employee That Worked on the Longest Task 2923. Find Champion I 2937. Make Three Strings Equal 139. Word Break 2037. Minimum Number of Moves to Seat Everyone 875. Koko Eating Bananas 232. Implement Queue using Stacks 113. Path Sum II 461. Hamming Distance 73. Set Matrix Zeroes 2609. Find the Longest Balanced Substring of a Binary String 1827. Minimum Operations to Make the Array Increasing 226. Invert Binary Tree 538. Convert BST to Greater Tree 1356. Sort Integers by The Number of 1 Bits 894. All Possible Full Binary Trees 2549. Count Distinct Numbers on Board 486. Predict the Winner 355. Design Twitter 316. Remove Duplicate Letters 643. Maximum Average Subarray I 722. Remove Comments 500. Keyboard Row 497. Random Point in Non-overlapping Rectangles 1539. Kth Missing Positive Number 863. All Nodes Distance K in Binary Tree 2194. Cells in a Range on an Excel Sheet 326. Power of Three 2951. Find the Peaks 434. Number of Segments in a String 2089. Find Target Indices After Sorting Array 1773. Count Items Matching a Rule 841. Keys and Rooms 1046. Last Stone Weight 804. Unique Morse Code Words 318. Maximum Product of Word Lengths 784. Letter Case Permutation 278. First Bad Version 464. Can I Win 414. Third Maximum Number 275. H-Index II 1374. Generate a String With Characters That Have Odd Counts 2423. Remove Letter To Equalize Frequency 168. Excel Sheet Column Title 1869. Longer Contiguous Segments of Ones than Zeros 2717. Semi-Ordered Permutation 2848. Points That Intersect With Cars 55. Jump Game 121. Best Time to Buy and Sell Stock 1550. Three Consecutive Odds 667. Beautiful Arrangement II 1413. Minimum Value to Get Positive Step by Step Sum 2078. Two Furthest Houses With Different Colors 210. Course Schedule II 695. Max Area of Island 1051. Height Checker 1805. Number of Different Integers in a String 766. Toeplitz Matrix 2475. Number of Unequal Triplets in Array 2347. Best Poker Hand 1662. Check If Two String Arrays are Equivalent 400. Nth Digit 2236. Root Equals Sum of Children 3024. Type of Triangle 2639. Find the Width of Columns of a Grid 1331. Rank Transform of an Array 528. Random Pick with Weight 561. Array Partition 1812. Determine Color of a Chessboard Square 2525. Categorize Box According to Criteria 89. Gray Code 2287. Rearrange Characters to Make Target String 223. Rectangle Area 2996. Smallest Missing Integer Greater Than Sequential Prefix Sum 292. Nim Game 2215. Find the Difference of Two Arrays 1652. Defuse the Bomb 866. Prime Palindrome 3114. Latest Time You Can Obtain After Replacing Characters 698. Partition to K Equal Sum Subsets 993. Cousins in Binary Tree 20. Valid Parentheses 1974. Minimum Time to Type Word Using Special Typewriter 1995. Count Special Quadruplets 58. Length of Last Word 17. Letter Combinations of a Phone Number 146. LRU Cache 933. Number of Recent Calls 1475. Final Prices With a Special Discount in a Shop 589. N-ary Tree Preorder Traversal 433. Minimum Genetic Mutation 790. Domino and Tromino Tiling 83. Remove Duplicates from Sorted List 63. Unique Paths II 2206. Divide Array Into Equal Pairs 617. Merge Two Binary Trees 31. Next Permutation 1598. Crawler Log Folder 1022. Sum of Root To Leaf Binary Numbers 344. Reverse String 1431. Kids With the Greatest Number of Candies 535. Encode and Decode TinyURL 189. Rotate Array 1684. Count the Number of Consistent Strings 15. 3Sum 386. Lexicographical Numbers 3083. Existence of a Substring in a String and Its Reverse 714. Best Time to Buy and Sell Stock with Transaction Fee 435. Non-overlapping Intervals 1582. Special Positions in a Binary Matrix 402. Remove K Digits 855. Exam Room 1903. Largest Odd Number in String 57. Insert Interval 2299. Strong Password Checker II 1337. The K Weakest Rows in a Matrix 2506. Count Pairs Of Similar Strings 133. Clone Graph 1816. Truncate Sentence 748. Shortest Completing Word 1700. Number of Students Unable to Eat Lunch 2190. Most Frequent Number Following Key In an Array 518. Coin Change II 2974. Minimum Number Game 2273. Find Resultant Array After Removing Anagrams 2932. Maximum Strong Pair XOR I 456. 132 Pattern 838. Push Dominoes 208. Implement Trie (Prefix Tree) 884. Uncommon Words from Two Sentences 890. Find and Replace Pattern 718. Maximum Length of Repeated Subarray 165. Compare Version Numbers 965. Univalued Binary Tree 2591. Distribute Money to Maximum Children 665. Non-decreasing Array 213. House Robber II 2351. First Letter to Appear Twice 3079. Find the Sum of Encrypted Integers 1389. Create Target Array in the Given Order 2544. Alternating Digit Sum 230. Kth Smallest Element in a BST 821. Shortest Distance to a Character 3033. Modify the Matrix 187. Repeated DNA Sequences 1496. Path Crossing 532. K-diff Pairs in an Array 3110. Score of a String 409. Longest Palindrome 842. Split Array into Fibonacci Sequence 3005. Count Elements With Maximum Frequency 747. Largest Number At Least Twice of Others 802. Find Eventual Safe States 206. Reverse Linked List 851. Loud and Rich 709. To Lower Case 372. Super Pow 1768. Merge Strings Alternately 2706. Buy Two Chocolates 867. Transpose Matrix 2373. Largest Local Values in a Matrix 917. Reverse Only Letters 401. Binary Watch 377. Combination Sum IV 78. Subsets 1758. Minimum Changes To Make Alternating Binary String 2574. Left and Right Sum Differences 1592. Rearrange Spaces Between Words 1365. How Many Numbers Are Smaller Than the Current Number 558. Logical OR of Two Binary Grids Represented as Quad-Trees 1736. Latest Time by Replacing Hidden Digits 868. Binary Gap 2395. Find Subarrays With Equal Sum 541. Reverse String II 877. Stone Game 5. Longest Palindromic Substring 237. Delete Node in a Linked List 463. Island Perimeter 852. Peak Index in a Mountain Array 788. Rotated Digits 2582. Pass the Pillow 911. Online Election 3042. Count Prefix and Suffix Pairs I 1078. Occurrences After Bigram 825. Friends Of Appropriate Ages 341. Flatten Nested List Iterator 368. Largest Divisible Subset 2682. Find the Losers of the Circular Game 390. Elimination Game 609. Find Duplicate File in System 284. Peeking Iterator 3168. Minimum Number of Chairs in a Waiting Room 219. Contains Duplicate II 771. Jewels and Stones 2022. Convert 1D Array Into 2D Array 688. Knight Probability in Chessboard 1266. Minimum Time Visiting All Points 67. Add Binary 2651. Calculate Delayed Arrival Time 310. Minimum Height Trees 3136. Valid Word 1460. Make Two Arrays Equal by Reversing Subarrays 590. N-ary Tree Postorder Traversal 29. Divide Two Integers 436. Find Right Interval 2180. Count Integers With Even Digit Sum 2678. Number of Senior Citizens 1380. Lucky Numbers in a Matrix 820. Short Encoding of Words 1507. Reformat Date 357. Count Numbers with Unique Digits 404. Sum of Left Leaves 575. Distribute Candies 1822. Sign of the Product of an Array 2103. Rings and Rods 690. Employee Importance 3178. Find the Child Who Has the Ball After K Seconds 553. Optimal Division 697. Degree of an Array 228. Summary Ranges 64. Minimum Path Sum 3194. Minimum Average of Smallest and Largest Elements 2855. Minimum Right Shifts to Sort the Array 1217. Minimum Cost to Move Chips to The Same Position 2562. Find the Array Concatenation Value 1013. Partition Array Into Three Parts With Equal Sum 813. Largest Sum of Averages 704. Binary Search 840. Magic Squares In Grid ###Solution 643. Maximum Average Subarray I 35. Search Insert Position 198. House Robber 402. Remove K Digits 203. Remove Linked List Elements 304. Range Sum Query 2D - Immutable 2739. Total Distance Traveled 677. Map Sum Pairs 1859. Sorting the Sentence 583. Delete Operation for Two Strings 2951. Find the Peaks 653. Two Sum IV - Input is a BST 647. Palindromic Substrings 17. Letter Combinations of a Phone Number 155. Min Stack 172. Factorial Trailing Zeroes 1512. Number of Good Pairs 890. Find and Replace Pattern 138. Copy List with Random Pointer 386. Lexicographical Numbers 875. Koko Eating Bananas 481. Magical String 806. Number of Lines To Write String 268. Missing Number 2765. Longest Alternating Subarray 99. Recover Binary Search Tree 350. Intersection of Two Arrays II 1295. Find Numbers with Even Number of Digits 1184. Distance Between Bus Stops 434. Number of Segments in a String 187. Repeated DNA Sequences 520. Detect Capital 633. Sum of Square Numbers 2806. Account Balance After Rounded Purchase 1880. Check if Word Equals Summation of Two Words 221. Maximal Square 227. Basic Calculator II 2996. Smallest Missing Integer Greater Than Sequential Prefix Sum 938. Range Sum of BST 1413. Minimum Value to Get Positive Step by Step Sum 2441. Largest Positive Integer That Exists With Its Negative 2269. Find the K-Beauty of a Number 809. Expressive Words 3200. Maximum Height of a Triangle 1678. Goal Parser Interpretation 449. Serialize and Deserialize BST 49. Group Anagrams 1047. Remove All Adjacent Duplicates In String 977. Squares of a Sorted Array 650. 2 Keys Keyboard 1252. Cells with Odd Values in a Matrix 2660. Determine the Winner of a Bowling Game 682. Baseball Game 2511. Maximum Enemy Forts That Can Be Captured 397. Integer Replacement 989. Add to Array-Form of Integer 2351. First Letter to Appear Twice 680. Valid Palindrome II 452. Minimum Number of Arrows to Burst Balloons 1925. Count Square Sum Triples 722. Remove Comments 47. Permutations II 738. Monotone Increasing Digits 874. Walking Robot Simulation 300. Longest Increasing Subsequence 944. Delete Columns to Make Sorted 1935. Maximum Number of Words You Can Type 2578. Split With Minimum Sum 1700. Number of Students Unable to Eat Lunch 209. Minimum Size Subarray Sum 2042. Check if Numbers Are Ascending in a Sentence 1603. Design Parking System 795. Number of Subarrays with Bounded Maximum 816. Ambiguous Coordinates 884. Uncommon Words from Two Sentences 1566. Detect Pattern of Length M Repeated K or More Times 886. Possible Bipartition 190. Reverse Bits 1805. Number of Different Integers in a String 623. Add One Row to Tree 581. Shortest Unsorted Continuous Subarray 275. H-Index II 748. Shortest Completing Word 1089. Duplicate Zeros 81. Search in Rotated Sorted Array II 2873. Maximum Value of an Ordered Triplet I 565. Array Nesting 976. Largest Perimeter Triangle 941. Valid Mountain Array 263. Ugly Number 2287. Rearrange Characters to Make Target String 12. Integer to Roman 74. Search a 2D Matrix 858. Mirror Reflection 1464. Maximum Product of Two Elements in an Array 141. Linked List Cycle 2899. Last Visited Integers 2733. Neither Minimum nor Maximum 3083. Existence of a Substring in a String and Its Reverse 2864. Maximum Odd Binary Number 1941. Check if All Characters Have Equal Number of Occurrences 849. Maximize Distance to Closest Person 2085. Count Common Words With One Occurrence 826. Most Profit Assigning Work 2717. Semi-Ordered Permutation 2475. Number of Unequal Triplets in Array 1684. Count the Number of Consistent Strings 654. Maximum Binary Tree 1200. Minimum Absolute Difference 1637. Widest Vertical Area Between Two Points Containing No Points 235. Lowest Common Ancestor of a Binary Search Tree 478. Generate Random Point in a Circle 1652. Defuse the Bomb 470. Implement Rand10() Using Rand7() 1929. Concatenation of Array 794. Valid Tic-Tac-Toe State 2535. Difference Between Element Sum and Digit Sum of an Array 792. Number of Matching Subsequences 421. Maximum XOR of Two Numbers in an Array 781. Rabbits in Forest 1022. Sum of Root To Leaf Binary Numbers 1128. Number of Equivalent Domino Pairs 393. UTF-8 Validation 670. Maximum Swap 2006. Count Number of Pairs With Absolute Difference K 448. Find All Numbers Disappeared in an Array 1619. Mean of Array After Removing Some Elements 1854. Maximum Population Year 786. K-th Smallest Prime Fraction 997. Find the Town Judge 2515. Shortest Distance to Target String in a Circular Array 199. Binary Tree Right Side View 700. Search in a Binary Search Tree 1422. Maximum Score After Splitting a String 2784. Check if Array is Good 2729. Check if The Number is Fascinating 389. Find the Difference 2769. Find the Maximum Achievable Number 1331. Rank Transform of an Array 1863. Sum of All Subset XOR Totals 2367. Number of Arithmetic Triplets 371. Sum of Two Integers 2894. Divisible and Non-divisible Sums Difference 48. Rotate Image 515. Find Largest Value in Each Tree Row 1991. Find the Middle Index in Array 24. Swap Nodes in Pairs 59. Spiral Matrix II 1486. XOR Operation in an Array 2540. Minimum Common Value 121. Best Time to Buy and Sell Stock 1221. Split a String in Balanced Strings 152. Maximum Product Subarray 168. Excel Sheet Column Title 18. 4Sum 506. Relative Ranks 3206. Alternating Groups I 400. Nth Digit 3046. Split the Array 695. Max Area of Island 804. Unique Morse Code Words 1672. Richest Customer Wealth 343. Integer Break 210. Course Schedule II 1636. Sort Array by Increasing Frequency 678. Valid Parenthesis String 137. Single Number II 169. Majority Element 22. Generate Parentheses 563. Binary Tree Tilt 1403. Minimum Subsequence in Non-Increasing Order 299. Bulls and Cows 2591. Distribute Money to Maximum Children 2389. Longest Subsequence With Limited Sum 2614. Prime In Diagonal 2176. Count Equal and Divisible Pairs in an Array 2937. Make Three Strings Equal 395. Longest Substring with At Least K Repeating Characters 763. Partition Labels 1037. Valid Boomerang 468. Validate IP Address 500. Keyboard Row 1399. Count Largest Group 676. Implement Magic Dictionary 344. Reverse String 3005. Count Elements With Maximum Frequency 2309. Greatest English Letter in Upper and Lower Case 859. Buddy Strings 319. Bulb Switcher 61. Rotate List 1408. String Matching in an Array 516. Longest Palindromic Subsequence 3038. Maximum Number of Operations With the Same Score I 111. Minimum Depth of Binary Tree 373. Find K Pairs with Smallest Sums 3014. Minimum Number of Pushes to Type Word I 686. Repeated String Match 842. Split Array into Fibonacci Sequence 554. Brick Wall 279. Perfect Squares 1837. Sum of Digits in Base K 309. Best Time to Buy and Sell Stock with Cooldown 429. N-ary Tree Level Order Traversal 1725. Number Of Rectangles That Can Form The Largest Square 1812. Determine Color of a Chessboard Square 1961. Check If String Is a Prefix of Array 398. Random Pick Index 712. Minimum ASCII Delete Sum for Two Strings 539. Minimum Time Difference 1030. Matrix Cells in Distance Order 3010. Divide an Array Into Subarrays With Minimum Cost I 1275. Find Winner on a Tic Tac Toe Game 3248. Snake in Matrix 2200. Find All K-Distant Indices in an Array 2293. Min Max Game 392. Is Subsequence 2469. Convert the Temperature 589. N-ary Tree Preorder Traversal 166. Fraction to Recurring Decimal 893. Groups of Special-Equivalent Strings 942. DI String Match 2206. Divide Array Into Equal Pairs 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree 13. Roman to Integer 1287. Element Appearing More Than 25% In Sorted Array 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence 1436. Destination City 112. Path Sum 2248. Intersection of Multiple Arrays 486. Predict the Winner 2124. Check if All A’s Appears Before All B’s 779. K-th Symbol in Grammar 831. Masking Personal Information 1893. Check if All the Integers in a Range Are Covered 441. Arranging Coins 529. Minesweeper 838. Push Dominoes 62. Unique Paths 73. Set Matrix Zeroes 164. Maximum Gap 2404. Most Frequent Even Element 1588. Sum of All Odd Length Subarrays 1351. Count Negative Numbers in a Sorted Matrix 1732. Find the Highest Altitude 2089. Find Target Indices After Sorting Array 1108. Defanging an IP Address 2696. Minimum String Length After Removing Substrings 1903. Largest Odd Number in String 1475. Final Prices With a Special Discount in a Shop 105. Construct Binary Tree from Preorder and Inorder Traversal 823. Binary Trees With Factors 215. Kth Largest Element in an Array 814. Binary Tree Pruning 334. Increasing Triplet Subsequence 687. Longest Univalue Path 1832. Check if the Sentence Is Pangram 307. Range Sum Query - Mutable 1790. Check if One String Swap Can Make Strings Equal 1984. Minimum Difference Between Highest and Lowest of K Scores 509. Fibonacci Number 1779. Find Nearest Point That Has the Same X or Y Coordinate 328. Odd Even Linked List 1002. Find Common Characters 3131. Find the Integer Added to Array I 145. Binary Tree Postorder Traversal 1260. Shift 2D Grid 844. Backspace String Compare 754. Reach a Number 139. Word Break 724. Find Pivot Index 628. Maximum Product of Three Numbers 496. Next Greater Element I 28. Find the Index of the First Occurrence in a String 744. Find Smallest Letter Greater Than Target 150. Evaluate Reverse Polish Notation 1876. Substrings of Size Three with Distinct Characters 922. Sort Array By Parity II 841. Keys and Rooms 1979. Find Greatest Common Divisor of Array 93. Restore IP Addresses 523. Continuous Subarray Sum 1550. Three Consecutive Odds 189. Rotate Array 605. Can Place Flowers 775. Global and Local Inversions 3095. Shortest Subarray With OR at Least K I 1103. Distribute Candies to People 1974. Minimum Time to Type Word Using Special Typewriter 769. Max Chunks To Make Sorted 2520. Count the Digits That Divide a Number 766. Toeplitz Matrix 530. Minimum Absolute Difference in BST 2220. Minimum Bit Flips to Convert Number 36. Valid Sudoku 58. Length of Last Word 1281. Subtract the Product and Sum of Digits of an Integer 2418. Sort the People 817. Linked List Components 621. Task Scheduler 342. Power of Four 790. Domino and Tromino Tiling 2697. Lexicographically Smallest Palindrome 427. Construct Quad Tree 1582. Special Positions in a Binary Matrix 1137. N-th Tribonacci Number 322. Coin Change 242. Valid Anagram 462. Minimum Moves to Equal Array Elements II 70. Climbing Stairs 399. Evaluate Division 693. Binary Number with Alternating Bits 3226. Number of Bit Changes to Make Two Integers Equal 3120. Count the Number of Special Characters I 901. Online Stock Span 380. Insert Delete GetRandom O(1) 508. Most Frequent Subtree Sum 2108. Find First Palindromic String in the Array 2810. Faulty Keyboard 525. Contiguous Array 337. House Robber III 313. Super Ugly Number 2586. Count the Number of Vowel Strings in Range 2549. Count Distinct Numbers on Board 2363. Merge Similar Items 374. Guess Number Higher or Lower 528. Random Pick with Weight 824. Goat Latin 1175. Prime Arrangements 993. Cousins in Binary Tree 173. Binary Search Tree Iterator 1450. Number of Students Doing Homework at a Given Time 2133. Check if Every Row and Column Contains All Numbers 3127. Make a Square with the Same Color 707. Design Linked List 3105. Longest Strictly Increasing or Strictly Decreasing Subarray 717. 1-bit and 2-bit Characters 791. Custom Sort String 909. Snakes and Ladders 2760. Longest Even Odd Subarray With Threshold 1370. Increasing Decreasing String 872. Leaf-Similar Trees 718. Maximum Length of Repeated Subarray 1844. Replace All Digits with Characters 1827. Minimum Operations to Make the Array Increasing 1576. Replace All ?’s to Avoid Consecutive Repeating Characters 114. Flatten Binary Tree to Linked List 1160. Find Words That Can Be Formed by Characters 2828. Check if a String Is an Acronym of Words 226. Invert Binary Tree 225. Implement Stack using Queues 519. Random Flip Matrix 2788. Split Strings by Separator 3000. Maximum Area of Longest Diagonal Rectangle 2824. Count Pairs Whose Sum is Less than Target 435. Non-overlapping Intervals 728. Self Dividing Numbers 1704. Determine if String Halves Are Alike 706. Design HashMap 1232. Check If It Is a Straight Line 2239. Find Closest Number to Zero 830. Positions of Large Groups 71. Simplify Path 538. Convert BST to Greater Tree 290. Word Pattern 86. Partition List 447. Number of Boomerangs 836. Rectangle Overlap 740. Delete and Earn 1189. Maximum Number of Balloons 540. Single Element in a Sorted Array 714. Best Time to Buy and Sell Stock with Transaction Fee 96. Unique Binary Search Trees 1752. Check if Array Is Sorted and Rotated 476. Number Complement 492. Construct the Rectangle 287. Find the Duplicate Number 2656. Maximum Sum With Exactly K Elements 39. Combination Sum 289. Game of Life 2129. Capitalize the Title 561. Array Partition 232. Implement Queue using Stacks 2053. Kth Distinct String in an Array 1629. Slowest Key 752. Open the Lock 767. Reorganize String 378. Kth Smallest Element in a Sorted Matrix 799. Champagne Tower 636. Exclusive Time of Functions 31. Next Permutation 20. Valid Parentheses 2144. Minimum Cost of Buying Candies With Discount 236. Lowest Common Ancestor of a Binary Tree 1791. Find Center of Star Graph 331. Verify Preorder Serialization of a Binary Tree 684. Redundant Connection 57. Insert Interval 729. My Calendar I 2839. Check if Strings Can be Made Equal With Operations I 130. Surrounded Regions 3065. Minimum Operations to Exceed Threshold Value I 2451. Odd String Difference 808. Soup Servings 522. Longest Uncommon Subsequence II 2331. Evaluate Boolean Binary Tree 557. Reverse Words in a String III 494. Target Sum 1154. Day of the Year 673. Number of Longest Increasing Subsequence 556. Next Greater Element III 146. LRU Cache 2525. Categorize Box According to Criteria 611. Valid Triangle Number 412. Fizz Buzz 2210. Count Hills and Valleys in an Array 56. Merge Intervals 819. Most Common Word 171. Excel Sheet Column Number 2413. Smallest Even Multiple 179. Largest Number 2000. Reverse Prefix of Word 2748. Number of Beautiful Pairs 2529. Maximum Count of Positive Integer and Negative Integer 433. Minimum Genetic Mutation 1773. Count Items Matching a Rule 655. Print Binary Tree 230. Kth Smallest Element in a BST 453. Minimum Moves to Equal Array Elements 443. String Compression 929. Unique Email Addresses 2379. Minimum Recolors to Get K Consecutive Black Blocks 1624. Largest Substring Between Two Equal Characters 2942. Find Words Containing Character 888. Fair Candy Swap 2243. Calculate Digit Sum of a String 3069. Distribute Elements Into Two Arrays I 2956. Find Common Elements Between Two Arrays 863. All Nodes Distance K in Binary Tree 442. Find All Duplicates in an Array 593. Valid Square 524. Longest Word in Dictionary through Deleting 204. Count Primes 1346. Check If N and Its Double Exist 3. Longest Substring Without Repeating Characters 731. My Calendar II 153. Find Minimum in Rotated Sorted Array 2446. Determine if Two Events Have Conflict 2073. Time Needed to Buy Tickets 2490. Circular Sentence 2119. A Number After a Double Reversal 503. Next Greater Element II 120. Triangle 542. 01 Matrix 2903. Find Indices With Index and Value Difference I 1337. The K Weakest Rows in a Matrix 19. Remove Nth Node From End of List 109. Convert Sorted List to Binary Search Tree 796. Rotate String 617. Merge Two Binary Trees 1995. Count Special Quadruplets 2455. Average Value of Even Numbers That Are Divisible by Three 2900. Longest Unequal Adjacent Groups Subsequence I 2164. Sort Even and Odd Indices Independently 2264. Largest 3-Same-Digit Number in String 1332. Remove Palindromic Subsequences 292. Nim Game 454. 4Sum II 3146. Permutation Difference between Two Strings 283. Move Zeroes 201. Bitwise AND of Numbers Range 905. Sort Array By Parity 2833. Furthest Point From Origin 638. Shopping Offers 2154. Keep Multiplying Found Values by Two 43. Multiply Strings 413. Arithmetic Slices 264. Ugly Number II 1417. Reformat The String 101. Symmetric Tree 598. Range Addition II 698. Partition to K Equal Sum Subsets 2194. Cells in a Range on an Excel Sheet 1668. Maximum Repeating Substring 165. Compare Version Numbers 2094. Finding 3-Digit Even Numbers 543. Diameter of Binary Tree 606. Construct String from Binary Tree 645. Set Mismatch 2506. Count Pairs Of Similar Strings 1710. Maximum Units on a Truck 599. Minimum Index Sum of Two Lists 2357. Make Array Zero by Subtracting Equal Amounts 2315. Count Asterisks 646. Maximum Length of Pair Chain 206. Reverse Linked List 162. Find Peak Element 821. Shortest Distance to a Character 2114. Maximum Number of Words Found in Sentences 79. Word Search 2062. Count Vowel Substrings of a String 2335. Minimum Amount of Time to Fill Cups 2231. Largest Number After Digit Swaps by Parity 3074. Apple Redistribution into Boxes 94. Binary Tree Inorder Traversal 231. Power of Two 274. H-Index 53. Maximum Subarray 667. Beautiful Arrangement II 725. Split Linked List in Parts 33. Search in Rotated Sorted Array 55. Jump Game 423. Reconstruct Original Digits from English 3222. Find the Winning Player in Coin Game 485. Max Consecutive Ones 547. Number of Provinces 414. Third Maximum Number 2744. Find Maximum Number of String Pairs 1071. Greatest Common Divisor of Strings 2558. Take Gifts From the Richest Pile 2016. Maximum Difference Between Increasing Elements 316. Remove Duplicate Letters 853. Car Fleet 91. Decode Ways 241. Different Ways to Add Parentheses 497. Random Point in Non-overlapping Rectangles 430. Flatten a Multilevel Doubly Linked List 3090. Maximum Length Substring With Two Occurrences 674. Longest Continuous Increasing Subsequence 3232. Find if Digit Game Can Be Won 438. Find All Anagrams in a String 501. Find Mode in Binary Search Tree 1539. Kth Missing Positive Number 110. Balanced Binary Tree 2605. Form Smallest Number From Two Digit Arrays 789. Escape The Ghosts 450. Delete Node in a BST 128. Longest Consecutive Sequence 223. Rectangle Area 2437. Number of Valid Clock Times 2917. Find the K-or of an Array 1694. Reformat Phone Number 3184. Count Pairs That Form a Complete Day I 2236. Root Equals Sum of Children 866. Prime Palindrome 933. Number of Recent Calls 222. Count Complete Tree Nodes 103. Binary Tree Zigzag Level Order Traversal 349. Intersection of Two Arrays 861. Score After Flipping Matrix 3210. Find the Encrypted String 908. Smallest Range I 2913. Subarrays Distinct Element Sum of Squares I 467. Unique Substrings in Wraparound String 873. Length of Longest Fibonacci Subsequence 80. Remove Duplicates from Sorted Array II 2570. Merge Two 2D Arrays by Summing Values 671. Second Minimum Node In a Binary Tree 845. Longest Mountain in Array 475. Heaters 2138. Divide a String Into Groups of Size k 2148. Count Elements With Strictly Smaller and Greater Elements 1446. Consecutive Characters 1897. Redistribute Characters to Make All Strings Equal 9. Palindrome Number 202. Happy Number 2710. Remove Trailing Zeros From a String 451. Sort Characters By Frequency 1957. Delete Characters to Make Fancy String 100. Same Tree 1913. Maximum Product Difference Between Two Pairs 2481. Minimum Cuts to Divide a Circle 560. Subarray Sum Equals K 1207. Unique Number of Occurrences 1317. Convert Integer to the Sum of Two No-Zero Integers 405. Convert a Number to Hexadecimal 592. Fraction Addition and Subtraction 756. Pyramid Transition Matrix 396. Rotate Function 965. Univalued Binary Tree 537. Complex Number Multiplication 1122. Relative Sort Array 518. Coin Change II 1646. Get Maximum in Generated Array 669. Trim a Binary Search Tree 896. Monotonic Array 1614. Maximum Nesting Depth of the Parentheses 855. Exam Room 3114. Latest Time You Can Obtain After Replacing Characters 1185. Day of the Week 27. Remove Element 90. Subsets II 1784. Check if Binary String Has at Most One Segment of Ones 2798. Number of Employees Who Met the Target 1431. Kids With the Greatest Number of Candies 1800. Maximum Ascending Subarray Sum 191. Number of 1 Bits 318. Maximum Product of Word Lengths 1496. Path Crossing 229. Majority Element II 709. To Lower Case 1662. Check If Two String Arrays are Equivalent 1374. Generate a String With Characters That Have Odd Counts 1848. Minimum Distance to the Target Element 77. Combinations 1598. Crawler Log Folder 2259. Remove Digit From Number to Maximize Result 881. Boats to Save People 54. Spiral Matrix 88. Merge Sorted Array 641. Design Circular Deque 2283. Check if Number Has Equal Digit Count and Digit Value 513. Find Bottom Left Tree Value 672. Bulb Switcher II 113. Path Sum II 491. Non-decreasing Subsequences 131. Palindrome Partitioning 2423. Remove Letter To Equalize Frequency 870. Advantage Shuffle 2047. Number of Valid Words in a Sentence 705. Design HashSet 1299. Replace Elements with Greatest Element on Right Side 832. Flipping an Image 107. Binary Tree Level Order Traversal II 721. Accounts Merge 394. Decode String 720. Longest Word in Dictionary 640. Solve the Equation 21. Merge Two Sorted Lists 2843. Count Symmetric Integers 1018. Binary Prefix Divisible By 5 1640. Check Array Formation Through Concatenation 1502. Can Make Arithmetic Progression From Sequence 835. Image Overlap 1556. Thousand Separator 144. Binary Tree Preorder Traversal 136. Single Number 885. Spiral Matrix III 865. Smallest Subtree with all the Deepest Nodes 3079. Find the Sum of Encrypted Integers 406. Queue Reconstruction by Height 860. Lemonade Change 125. Valid Palindrome 787. Cheapest Flights Within K Stops 2908. Minimum Sum of Mountain Triplets I 445. Add Two Numbers II 1720. Decode XORed Array 2299. Strong Password Checker II 910. Smallest Range II 1290. Convert Binary Number in a Linked List to Integer 3099. Harshad Number 345. Reverse Vowels of a String 649. Dota2 Senate 2595. Number of Even and Odd Bits 98. Validate Binary Search Tree 1952. Three Divisors 66. Plus One 1051. Height Checker 507. Perfect Number 104. Maximum Depth of Binary Tree 892. Surface Area of 3D Shapes 278. First Bad Version 1523. Count Odd Numbers in an Interval Range 822. Card Flipping Game 2496. Maximum Value of a String in an Array 26. Remove Duplicates from Sorted Array 455. Assign Cookies 784. Letter Case Permutation 925. Long Pressed Name 551. Student Attendance Record I 3024. Type of Triangle 783. Minimum Distance Between BST Nodes 1886. Determine Whether Matrix Can Be Obtained By Rotation 260. Single Number III 40. Combination Sum II 2185. Counting Words With a Given Prefix 207. Course Schedule 75. Sort Colors 2399. Check Distances Between Same Letters 807. Max Increase to Keep City Skyline 2716. Minimize String Length 1360. Number of Days Between Two Dates 566. Reshape the Matrix 665. Non-decreasing Array 1528. Shuffle String 133. Clone Graph 739. Daily Temperatures 89. Gray Code 3238. Find the Number of Winning Players 148. Sort List 8. String to Integer (atoi) 743. Network Delay Time 637. Average of Levels in Binary Tree 713. Subarray Product Less Than K 2600. K Items With the Maximum Sum 848. Shifting Letters 143. Reorder List 7. Reverse Integer 1389. Create Target Array in the Given Order 208. Implement Trie (Prefix Tree) 1796. Second Largest Digit in a String 1009. Complement of Base 10 Integer 416. Partition Equal Subset Sum 38. Count and Say 880. Decoded String at Index 811. Subdomain Visit Count 63. Unique Paths II 3028. Ant on the Boundary 2341. Maximum Number of Pairs in Array 559. Maximum Depth of N-ary Tree 211. Design Add and Search Words Data Structure 1480. Running Sum of 1d Array 1025. Divisor Game 83. Remove Duplicates from Sorted List 797. All Paths From Source to Target 142. Linked List Cycle II 473. Matchsticks to Square 102. Binary Tree Level Order Traversal 999. Available Captures for Rook 45. Jump Game II 118. Pascal’s Triangle 785. Is Graph Bipartite? 464. Can I Win 747. Largest Number At Least Twice of Others 2465. Number of Distinct Averages 762. Prime Number of Set Bits in Binary Representation 2037. Minimum Number of Moves to Seat Everyone 733. Flood Fill 1572. Matrix Diagonal Sum 347. Top K Frequent Elements 3019. Number of Changing Keys 696. Count Binary Substrings 661. Image Smoother 2347. Best Poker Hand 914. X of a Kind in a Deck of Cards 461. Hamming Distance 46. Permutations 833. Find And Replace in String 2427. Number of Common Factors 424. Longest Repeating Character Replacement 234. Palindrome Linked List 2068. Check Whether Two Strings are Almost Equivalent 692. Top K Frequent Words 2869. Minimum Operations to Collect Elements 900. RLE Iterator 122. Best Time to Buy and Sell Stock II 2027. Minimum Moves to Convert String 151. Reverse Words in a String 108. Convert Sorted Array to Binary Search Tree 129. Sum Root to Leaf Numbers 2928. Distribute Candies Among Children I 2670. Find the Distinct Difference Array 504. Base 7 1920. Build Array from Permutation 3190. Find Minimum Operations to Make All Elements Divisible by Three 1945. Sum of Digits of String After Convert 1385. Find the Distance Value Between Two Arrays 457. Circular Array Loop 160. Intersection of Two Linked Lists 622. Design Circular Queue 3033. Modify the Matrix 1967. Number of Strings That Appear as Substrings in Word 95. Unique Binary Search Trees II 2273. Find Resultant Array After Removing Anagrams 535. Encode and Decode TinyURL 134. Gas Station 1869. Longer Contiguous Segments of Ones than Zeros 419. Battleships in a Board 2325. Decode the Message 856. Score of Parentheses 1304. Find N Unique Integers Sum up to Zero 2500. Delete Greatest Value in Each Row 387. First Unique Character in a String 1534. Count Good Triplets 2643. Row With Maximum Ones 303. Range Sum Query - Immutable 2980. Check if Bitwise OR Has Trailing Zeros 1716. Calculate Money in Leetcode Bank 2099. Find Subsequence of Length K With the Largest Sum 2190. Most Frequent Number Following Key In an Array 1491. Average Salary Excluding the Minimum and Maximum Salary 764. Largest Plus Sign 258. Add Digits 2215. Find the Difference of Two Arrays 495. Teemo Attacking 2460. Apply Operations to an Array 703. Kth Largest Element in a Stream 11. Container With Most Water 1323. Maximum 69 Number 846. Hand of Straights 526. Beautiful Arrangement 498. Diagonal Traverse 3174. Clear Digits 34. Find First and Last Position of Element in Sorted Array 1816. Truncate Sentence 106. Construct Binary Tree from Inorder and Postorder Traversal 200. Number of Islands 2544. Alternating Digit Sum 384. Shuffle an Array 306. Additive Number 576. Out of Boundary Paths 648. Replace Words 904. Fruit Into Baskets 2609. Find the Longest Balanced Substring of a Binary String 417. Pacific Atlantic Water Flow 567. Permutation in String 2639. Find the Width of Columns of a Grid 383. Ransom Note 116. Populating Next Right Pointers in Each Node 147. Insertion Sort List 3242. Design Neighbor Sum Service 2859. Sum of Values at Indices With K Set Bits 1909. Remove One Element to Make the Array Strictly Increasing 2160. Minimum Sum of Four Digit Number After Splitting Digits 2. Add Two Numbers 3151. Special Array I 777. Swap Adjacent in LR String 883. Projection Area of 3D Shapes 2383. Minimum Hours of Training to Win a Competition 117. Populating Next Right Pointers in Each Node II 907. Sum of Subarray Minimums 388. Longest Absolute File Path 2485. Find the Pivot Integer 897. Increasing Order Search Tree 1688. Count of Matches in Tournament 3110. Score of a String 2778. Sum of Squares of Special Elements 2974. Minimum Number Game 459. Repeated Substring Pattern 477. Total Hamming Distance 2946. Matrix Similarity After Cyclic Shifts 376. Wiggle Subsequence 594. Longest Harmonious Subsequence 14. Longest Common Prefix 324. Wiggle Sort II 1748. Sum of Unique Elements 2032. Two Out of Three 92. Reverse Linked List II 119. Pascal’s Triangle II 1470. Shuffle the Array 1608. Special Array With X Elements Greater Than or Equal X 898. Bitwise ORs of Subarrays 367. Valid Perfect Square 2965. Find Missing and Repeated Values 2815. Max Pair Sum in an Array 851. Loud and Rich 2644. Find the Maximum Divisibility Score 240. Search a 2D Matrix II 2224. Minimum Number of Operations to Convert Time 652. Find Duplicate Subtrees 521. Longest Uncommon Subsequence I 894. All Possible Full Binary Trees 216. Combination Sum III 1518. Water Bottles 16. 3Sum Closest 2409. Count Days Spent Together 415. Add Strings 961. N-Repeated Element in Size 2N Array 1971. Find if Path Exists in Graph 257. Binary Tree Paths 812. Largest Triangle Area 456. 132 Pattern 532. K-diff Pairs in an Array 2078. Two Furthest Houses With Different Colors 1742. Maximum Number of Balls in a Box 1342. Number of Steps to Reduce a Number to Zero 1309. Decrypt String from Alphabet to Integer Mapping 2932. Maximum Strong Pair XOR I 735. Asteroid Collision 375. Guess Number Higher or Lower II 2553. Separate the Digits in an Array 2278. Percentage of Letter in String 837. New 21 Game 1763. Longest Nice Substring 1437. Check If All 1’s Are at Least Length K Places Away 6. Zigzag Conversion 1544. Make The String Great 2970. Count the Number of Incremovable Subarrays I 657. Robot Return to Origin 953. Verifying an Alien Dictionary 1021. Remove Outermost Parentheses 2566. Maximum Difference by Remapping a Digit 2303. Calculate Amount Paid in Taxes 802. Find Eventual Safe States 167. Two Sum II - Input Array Is Sorted 15. 3Sum 701. Insert into a Binary Search Tree 2057. Smallest Index With Equal Value 572. Subtree of Another Tree 474. Ones and Zeroes 3216. Lexicographically Smallest String After a Swap 482. License Key Formatting 365. Water and Jug Problem 72. Edit Distance 2848. Points That Intersect With Cars 2011. Final Value of Variable After Performing Operations 1394. Find Lucky Integer in an Array 437. Path Sum III 97. Interleaving String 1005. Maximize Sum Of Array After K Negations 382. Linked List Random Node 2960. Count Tested Devices After Test Operations 662. Maximum Width of Binary Tree 50. Pow(x, n) 1560. Most Visited Sector in a Circular Track 82. Remove Duplicates from Sorted List II 238. Product of Array Except Self 1046. Last Stone Weight 2255. Count Prefixes of a Given String 217. Contains Duplicate 326. Power of Three 3142. Check if Grid Satisfies Conditions 385. Mini Parser 409. Longest Palindrome 2923. Find Champion I 1656. Design an Ordered Stream 2319. Check if Matrix Is X-Matrix 338. Counting Bits 2169. Count Operations to Obtain Zero 876. Middle of the Linked List 3158. Find the XOR of Numbers Which Appear Twice 2235. Add Two Integers 889. Construct Binary Tree from Preorder and Postorder Traversal 69. Sqrt(x) 658. Find K Closest Elements 205. Isomorphic Strings 213. House Robber II 659. Split Array into Consecutive Subsequences 1313. Decompress Run-Length Encoded List 2432. The Employee That Worked on the Longest Task 355. Design Twitter 1356. Sort Integers by The Number of 1 Bits 3162. Find the Number of Good Pairs I 746. Min Cost Climbing Stairs 869. Reordered Power of 2 2652. Sum Multiples