A collection of daily LeetCode problems with solutions.
- [Jan 1] 1422. Maximum_Score_After_Splitting_a_String
- [Jan 2] 2559. Count Vowel Strings in Ranges
- [Jan 3] 2270. Number of Ways to Split Array
- [Jan 4] 1930. Unique Length-3 Palindromic Subsequences
- [Jan 5] 2381. Shifting Letters II
- [Jan 6] 1769. Minimum Number of Operations to Move All Balls to Each Box
- [Jan 7] 1408. String Matching in an Array
- [Jan 8] 3042. Count Prefix and Suffix Pairs I
- [Jan 9] 2185. Counting Words With a Given Prefix
- [Jan 10] 916. Word Subsets
- [Jan 11] 1400. Construct K Palindrome Strings
- [Jan 12] 2116. Check if a Parentheses String Can Be Valid
- [Jan 13] 3223. Minimum Length of String After Operations
- [Jan 14] 2657. Find the Prefix Common Array of Two Arrays
- [Jan 15] 2429. Minimize XOR
- [Jan 16] 2425. Bitwise XOR of All Pairings
- [Jan 17] 2683. Neighboring Bitwise XOR
- [Jan 18] 1368. Minimum Cost to Make at Least One Valid Path in a Grid
- [Jan 19] 407. Trapping Rain Water II
- [Jan 20] 2661. First Completely Painted Row or Column
- [Jan 21] 2017. Grid Game
- [Jan 22] 1765. Map of Highest Peak
- [Jan 23] 1267. Count Servers that Communicate
- [Jan 24] 802. Find Eventual Safe States
- [Jan 25] 2948. Make Lexicographically Smallest Array by Swapping Elements
- [Jan 26] 2127. Maximum Employees to Be Invited to a Meeting
- [Jan 27] 1462. Course Schedule IV
- [Jan 28] 2658. Maximum Number of Fish in a Grid
- [Jan 29] 684. Redundant Connection
- [Jan 30] 2493. Divide Nodes Into the Maximum Number of Groups
- [Jan 31] 827. Making A Large Island
- [Feb 1] 3151. Special Array I
- [Feb 2] 1752. Check if Array Is Sorted and Rotated
- [Feb 3] 3105. Longest Strictly Increasing or Strictly Decreasing Subarray
- [Feb 4] 1800. Maximum Ascending Subarray Sum4
- [Feb 5] 1790. Check if One String Swap Can Make Strings Equa
- [Feb 6] 1726. Tuple with Same Product
- [Feb 7] 3160. Find the Number of Distinct Colors Among the Balls
- [Feb 8] 2349. Design a Number Container System
- [Feb 9] 2364. Count Number of Bad Pairs
- [Feb 10] 3174. Clear Digits
- [Feb 11] 1910. Remove All Occurrences of a Substring
- [Feb 12] 2342. Max Sum of a Pair With Equal Sum of Digits
- [Feb 13] 3066. Minimum Operations to Exceed Threshold Value II
- [Feb 14] 1352. Product of the Last K Numbers
- [Feb 15] 2698. Find the Punishment Number of an Integer
- [Feb 16] 1718. Construct the Lexicographically Largest Valid Sequence
- [Feb 17] 1079. Letter Tile Possibilities
- [Feb 18] 2375. Construct Smallest Number From DI String
- [Feb 19] 1415. The k-th Lexicographical String of All Happy Strings of Length n
- [Feb 20] 1980. Find Unique Binary String
- [Feb 21] 1261. Find Elements in a Contaminated Binary Tree
- [Feb 22] 1028. Recover a Tree From Preorder Traversal
- [Feb 23] 889. Construct Binary Tree from Preorder and Postorder Traversal
- [Feb 24] 2467. Most Profitable Path in a Tree
- [Feb 25] 1524. Number of Sub-arrays With Odd Sum
- [Feb 26] 1749. Maximum Absolute Sum of Any Subarray
- [Feb 27] 873. Length of Longest Fibonacci Subsequence
- [Feb 28] 1092. Shortest Common Supersequence
- [Mar 1] 2460. Apply Operations to an Array
- [Mar 2] 2570. Merge Two 2D Arrays by Summing Values
- [Mar 3] 2161. Partition Array According to Given Pivot
- [Mar 4] 1780. Check if Number is a Sum of Powers of Three
- [Mar 5] 2579. Count Total Number of Colored Cells
- [Mar 6] 2965. Find Missing and Repeated Values
- [Mar 7] 2523. Closest Prime Numbers in Range
- [Mar 8] 2379. Minimum Recolors to Get K Consecutive Black Blocks
- [Mar 9] 3208. Alternating Groups II
- [Mar 10] 3306. Count of Substrings Containing Every Vowel and K Consonants II
- [Mar 11] 1358. Number of Substrings Containing All Three Characters
- [Mar 12] 2529. Maximum Count of Positive Integer and Negative Integer
- [Mar 13] 3356. Zero Array Transformation II
- [Mar 14] 2226. Maximum Candies Allocated to K Children
- [Mar 15] 2560. House Robber IV
- [Mar 16] 2594. Minimum Time to Repair Cars
- [Mar 17] 2206. Divide Array Into Equal Pairs
- [Mar 18] 2401. Longest Nice Subarray
- [Mar 19] 3191. Minimum Operations to Make Binary Array Elements Equal to One I
- [Mar 20] 3108. Minimum Cost Walk in Weighted Graph
- [Mar 21] 2115. Find All Possible Recipes from Given Supplies
- [Mar 22] 2685. Count the Number of Complete Components
- [Mar 23] 1976. Number of Ways to Arrive at Destination
- [Mar 24] 3169. Count Days Without Meetings
- [Mar 25] 3394. Check if Grid can be Cut into Sections
- [Mar 26] 2033. Minimum Operations to Make a Uni-Value Grid
- [Mar 27] 2780. Minimum Index of a Valid Split
- [Mar 28] 2503. Maximum Number of Points From Grid Queries
- [Mar 29] 2818. Apply Operations to Maximize Score
- [Mar 30] 763. Partition Labels
- [Mar 31] 2551. Put Marbles in Bags
Each solution includes:
- Problem description
- Approach explanation
- Time and Space complexity
- Solution code
- Primary: C++
- Alternative solutions in other languages are welcome
This repository is licensed under the MIT License - see the LICENSE file for details.