LeetCode problem solution: C++ / Java / Python / Go / TypeScript / ...
- LeetCode 26. Remove Duplicates from Sorted Array
- LeetCode 27. Remove Element
- LeetCode 88. Merge Sorted Array
- LeetCode 189. Rotate Array
- LeetCode 448. Find All Numbers Disappeared in an Array
- LeetCode 485. Max Consecutive Ones
- LeetCode 540. Single Element in a Sorted Array
- LeetCode 830. Positions of Large Groups
- LeetCode 905. Sort Array By Parity
- LeetCode 941. Valid Mountain Array
- LeetCode 985. Sum of Even Numbers After Queries
- LeetCode 989. Add to Array-Form of Integer
- LeetCode 1089. Duplicate Zeros
- LeetCode 1295. Find Numbers with Even Number of Digits
- LeetCode 1299. Replace Elements with Greatest Element on Right Side
- LeetCode 1346. Check If N and Its Double Exist
- LeetCode 1431. Kids With the Greatest Number of Candies
- LeetCode 1437. Check If All 1's Are at Least Length K Places Away
- LeetCode 1460. Make Two Arrays Equal by Reversing Sub-arrays
- LeetCode 1464. Maximum Product of Two Elements in an Array
- LeetCode 1470. Shuffle the Array
- LeetCode 1480. Running Sum of 1d Array
- LeetCode 1502. Can Make Arithmetic Progression From Sequence
- LeetCode 1512. Number of Good Pairs
- LeetCode 1534. Count Good Triplets
- LeetCode 1539. Kth Missing Positive Number
- LeetCode 1572. Matrix Diagonal Sum
- LeetCode 1619. Mean of Array After Removing Some Elements
- LeetCode 1629. Slowest Key
- LeetCode 1646. Get Maximum in Generated Array
- LeetCode 1662. Check If Two String Arrays are Equivalent
- LeetCode 1672. Richest Customer Wealth
- LeetCode 1725. Number Of Rectangles That Can Form The Largest Square
- LeetCode 1732. Find the Highest Altitude
- LeetCode 1779. Find Nearest Point That Has the Same X or Y Coordinate
- LeetCode 1812. Determine Color of a Chessboard Square
- LeetCode 1822. Sign of the Product of an Array
- LeetCode 1827. Minimum Operations to Make the Array Increasing
- LeetCode 1854. Maximum Population Year
- LeetCode 1929. Concatenation of Array
- LeetCode 1991. Find the Middle Index in Array
- LeetCode 2022. Convert 1D Array Into 2D Array
- LeetCode 2057. Smallest Index With Equal Value
- LeetCode 2194. Cells in a Range on an Excel Sheet
- LeetCode 2206. Divide Array Into Equal Pairs
- LeetCode 2239. Find Closest Number to Zero
- LeetCode 2460. Apply Operations to an Array
- LeetCode 2544. Alternating Digit Sum
- LeetCode 2553. Separate the Digits in an Array
- LeetCode 2562. Find the Array Concatenation Value
- LeetCode 2570. Merge Two 2D Arrays by Summing Values
- LeetCode 2778. Sum of Squares of Special Elements
- ...
- LeetCode 151. Reverse Words in a String
- LeetCode 165. Compare Version Numbers
- LeetCode 392. Is Subsequence
- LeetCode 520. Detect Capital
- LeetCode 551. Student Attendance Record I
- LeetCode 557. Reverse Words in a String III
- LeetCode 680. Valid Palindrome II
- LeetCode 796. Rotate String
- LeetCode 1309. Decrypt String from Alphabet to Integer Mapping
- LeetCode 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence
- LeetCode 1528. Shuffle String
- LeetCode 1576. Replace All ?'s to Avoid Consecutive Repeating Characters
- LeetCode 1592. Rearrange Spaces Between Words
- LeetCode 1624. Largest Substring Between Two Equal Characters
- LeetCode 1668. Maximum Repeating Substring
- LeetCode 1704. Determine if String Halves Are Alike
- LeetCode 1796. Second Largest Digit in a String
- LeetCode 1816. Truncate Sentence
- LeetCode 1844. Replace All Digits with Characters
- LeetCode 1880. Check if Word Equals Summation of Two Words
- LeetCode 1910. Remove All Occurrences of a Substring
- LeetCode 1945. Sum of Digits of String After Convert
- LeetCode 1961. Check If String Is a Prefix of Array
- LeetCode 1967. Number of Strings That Appear as Substrings in Word
- LeetCode 2000. Reverse Prefix of Word
- LeetCode 2042. Check if Numbers Are Ascending in a Sentence
- LeetCode 2108. Find First Palindromic String in the Array
- LeetCode 2138. Divide a String Into Groups of Size k
- LeetCode 2185. Counting Words With a Given Prefix
- LeetCode 2255. Count Prefixes of a Given String
- LeetCode 2259. Remove Digit From Number to Maximize Result
- LeetCode 2299. Strong Password Checker II
- LeetCode 2446. Determine if Two Events Have Conflict
- LeetCode 2496. Maximum Value of a String in an Array
- ...
- LeetCode 2. Add Two Numbers
- LeetCode 21. Merge Two Sorted Lists
- LeetCode 82. Remove Duplicates from Sorted List II
- LeetCode 83. Remove Duplicates from Sorted List
- LeetCode 86. Partition List
- LeetCode 141. Linked List Cycle
- LeetCode 203. Remove Linked List Elements
- LeetCode 206. Reverse Linked List
- LeetCode 234. Palindrome Linked List
- LeetCode 341. Flatten Nested List Iterator
- LeetCode 876. Middle of the Linked List
- ...
- LeetCode 20. Valid Parentheses
- LeetCode 150. Evaluate Reverse Polish Notation
- LeetCode 1441. Build an Array With Stack Operations
- LeetCode 1475. Final Prices With a Special Discount in a Shop
- LeetCode 1598. Crawler Log Folder
- LeetCode 1614. Maximum Nesting Depth of the Parentheses
- LeetCode 2390. Removing Stars From a String
- ...
- LeetCode 234. Palindrome Linked List
- LeetCode 622. Design Circular Queue
- LeetCode 1823. Find the Winner of the Circular Game
- LeetCode 2073. Time Needed to Buy Tickets
- ...
- LeetCode 1. Two Sum
- LeetCode 41. First Missing Positive
- LeetCode 136. Single Number
- LeetCode 167. Two Sum II - Input array is sorted
- LeetCode 169. Majority Element
- LeetCode 205. Isomorphic Strings
- LeetCode 217. Contains Duplicate
- LeetCode 219. Contains Duplicate II
- LeetCode 287. Find the Duplicate Number
- LeetCode 290. Word Pattern
- LeetCode 350. Intersection of Two Arrays II
- LeetCode 383. Ransom Note
- LeetCode 389. Find the Difference
- LeetCode 409. Longest Palindrome
- LeetCode 496. Next Greater Element I
- LeetCode 594. Longest Harmonious Subsequence
- LeetCode 609. Find Duplicate File in System
- LeetCode 697. Degree of an Array
- LeetCode 706. Design HashMap
- LeetCode 804. Unique Morse Code Words
- LeetCode 819. Most Common Word
- LeetCode 1287. Element Appearing More Than 25% In Sorted Array
- LeetCode 1446. Consecutive Characters
- LeetCode 1496. Path Crossing
- LeetCode 1507. Reformat Date
- LeetCode 1603. Design Parking System
- LeetCode 1636. Sort Array by Increasing Frequency
- LeetCode 1640. Check Array Formation Through Concatenation
- LeetCode 1684. Count the Number of Consistent Strings
- LeetCode 1748. Sum of Unique Elements
- LeetCode 1807. Evaluate the Bracket Pairs of a String
- LeetCode 1832. Check if the Sentence Is Pangram
- LeetCode 1897. Redistribute Characters to Make All Strings Equal
- LeetCode 1935. Maximum Number of Words You Can Type
- LeetCode 1941. Check if All Characters Have Equal Number of Occurrences
- LeetCode 2006. Count Number of Pairs With Absolute Difference K
- LeetCode 2032. Two Out of Three
- LeetCode 2043. Simple Bank System
- LeetCode 2053. Kth Distinct String in an Array
- LeetCode 2133. Check if Every Row and Column Contains All Numbers
- LeetCode 2186. Minimum Number of Steps to Make Two Strings Anagram II
- LeetCode 2215. Find the Difference of Two Arrays
- LeetCode 2248. Intersection of Multiple Arrays
- LeetCode 2278. Percentage of Letter in String
- LeetCode 2283. Check if Number Has Equal Digit Count and Digit Value
- LeetCode 2351. First Letter to Appear Twice
- LeetCode 2363. Merge Similar Items
- LeetCode 2404. Most Frequent Even Element
- LeetCode 2441. Largest Positive Integer That Exists With Its Negative
- LeetCode 2506. Count Pairs Of Similar Strings
- LeetCode 2540. Minimum Common Value
- ...
- ...
- LeetCode 98. Validate Binary Search Tree
- LeetCode 102. Binary Tree Level Order Traversal
- LeetCode 104. Maximum Depth of Binary Tree
- LeetCode 129. Sum Root to Leaf Numbers
- LeetCode 501. Find Mode in Binary Search Tree
- LeetCode 589. N-ary Tree Preorder Traversal
- LeetCode 606. Construct String from Binary Tree
- LeetCode 653. Two Sum IV - Input is a BST
- LeetCode 700. Search in a Binary Search Tree
- LeetCode 872. Leaf-Similar Trees
- LeetCode 1305. All Elements in Two Binary Search Trees
- LeetCode 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
- ...
- LeetCode 338. Counting Bits
- LeetCode 461. Hamming Distance
- LeetCode 477. Total Hamming Distance
- LeetCode 1009. Complement of Base 10 Integer
- LeetCode 1486. XOR Operation in an Array
- LeetCode 1720. Decode XORed Array
- LeetCode 1784. Check if Binary String Has at Most One Segment of Ones
- LeetCode 1869. Longer Contiguous Segments of Ones than Zeros
- LeetCode 1980. Find Unique Binary String
- LeetCode 2859. Sum of Values at Indices With K Set Bits
- LeetCode 2980. Check if Bitwise OR Has Trailing Zeros
- ...
- LeetCode 263. Ugly Number
- LeetCode 326. Power of Three
- LeetCode 441. Arranging Coins
- LeetCode 453. Minimum Moves to Equal Array Elements
- LeetCode 1103. Distribute Candies to People
- LeetCode 1518. Water Bottles
- LeetCode 1523. Count Odd Numbers in an Interval Range
- LeetCode 1920. Build Array from Permutation
- LeetCode 1925. Count Square Sum Triples
- LeetCode 1952. Three Divisors
- LeetCode 1979. Find Greatest Common Divisor of Array
- LeetCode 2119. A Number After a Double Reversal
- LeetCode 2413. Smallest Even Multiple
- LeetCode 2427. Number of Common Factors
- LeetCode 2455. Average Value of Even Numbers That Are Divisible by Three
- LeetCode 2520. Count the Digits That Divide a Number
- ...
- LeetCode 724. Find Pivot Index
- LeetCode 1422. Maximum Score After Splitting a String
- LeetCode 2485. Find the Pivot Integer
- LeetCode 2574. Left and Right Sum Differences
- ...
- LeetCode 19. Remove Nth Node From End of List
- LeetCode 283. Move Zeroes
- LeetCode 344. Reverse String
- LeetCode 392. Is Subsequence
- LeetCode 495. Teemo Attacking
- LeetCode 942. DI String Match
- LeetCode 876. Middle of the Linked List
- LeetCode 977. Squares of a Sorted Array
- ...
- LeetCode 485. Max Consecutive Ones
- LeetCode 1004. Max Consecutive Ones III
- LeetCode 1423. Maximum Points You Can Obtain from Cards
- LeetCode 1566. Detect Pattern of Length M Repeated K or More Times
- LeetCode 1588. Sum of All Odd Length Subarrays
- LeetCode 1876. Substrings of Size Three with Distinct Characters
- LeetCode 1984. Minimum Difference Between Highest and Lowest of K Scores
- LeetCode 2264. Largest 3-Same-Digit Number in String
- LeetCode 2269. Find the K-Beauty of a Number
- ...
- LeetCode 75. Sort Colors
- LeetCode 414. Third Maximum Number
- LeetCode 506. Relative Ranks
- LeetCode 628. Maximum Product of Three Numbers
- LeetCode 944. Delete Columns to Make Sorted
- LeetCode 1051. Height Checker
- LeetCode 1491. Average Salary Excluding the Minimum and Maximum Salary
- LeetCode 1846. Maximum Element After Decreasing and Rearranging
- LeetCode 1859. Sorting the Sentence
- LeetCode 1909. Remove One Element to Make the Array Strictly Increasing
- LeetCode 1913. Maximum Product Difference Between Two Pairs
- LeetCode 1985. Find the Kth Largest Integer in the Array
- LeetCode 2007. Find Original Array From Doubled Array
- LeetCode 2070. Most Beautiful Item for Each Query
- LeetCode 2089. Find Target Indices After Sorting Array
- LeetCode 2164. Sort Even and Odd Indices Independently
- ...
- LeetCode 35. Search Insert Position
- LeetCode 278. First Bad Version
- LeetCode 374. Guess Number Higher or Lower
- LeetCode 463. Island Perimeter
- LeetCode 690. Employee Importance
- LeetCode 704. Binary Search
- LeetCode 733. Flood Fill
- LeetCode 744. Find Smallest Letter Greater Than Target
- LeetCode 747. Largest Number At Least Twice of Others
- LeetCode 821. Shortest Distance to a Character
- LeetCode 852. Peak Index in a Mountain Array
- LeetCode 994. Rotting Oranges
- LeetCode 1992. Find All Groups of Farmland
- ...
- LeetCode 455. Assign Cookies
- LeetCode 806. Number of Lines To Write String
- LeetCode 1221. Split a String in Balanced Strings
- LeetCode 1323. Maximum 69 Number
- LeetCode 1893. Check if All the Integers in a Range Are Covered
- LeetCode 1903. Largest Odd Number in String
- LeetCode 1946. Largest Number After Mutating Substring
- LeetCode 2078. Two Furthest Houses With Different Colors
- LeetCode 2160. Minimum Sum of Four Digit Number After Splitting Digits
- LeetCode 2144. Minimum Cost of Buying Candies With Discount
- ...
- LeetCode 357. Count Numbers with Unique Digits
- LeetCode 1239. Maximum Length of a Concatenated String with Unique Characters
- LeetCode 1863. Sum of All Subset XOR Totals
- ...
- ...
- LeetCode 70. Climbing Stairs
- LeetCode 91. Decode Ways
- LeetCode 198. House Robber
- LeetCode 509. Fibonacci Number
- LeetCode 583. Delete Operation for Two Strings
- LeetCode 746. Min Cost Climbing Stairs
- LeetCode 1137. N-th Tribonacci Number
- LeetCode 1981. Minimize the Difference Between Target and Chosen Elements
- ...
- LeetCode 13. Roman to Integer
- LeetCode 204. Count Primes
- LeetCode 258. Add Digits
- LeetCode 1281. Subtract the Product and Sum of Digits of an Integer
- LeetCode 1550. Three Consecutive Odds
- LeetCode 1678. Goal Parser Interpretation
- LeetCode 1716. Calculate Money in Leetcode Bank
- LeetCode 1837. Sum of Digits in Base K
- LeetCode 2180. Count Integers With Even Digit Sum
- LeetCode 2469. Convert the Temperature
- LeetCode 2475. Number of Unequal Triplets in Array
- LeetCode 2824. Count Pairs Whose Sum is Less than Target
- ...