This repository contains my solutions to various LeetCode problems and contests. Each solution is carefully crafted to demonstrate efficient problem-solving approaches.
Note: These projects are for practice purposes only.
contests/
- Contest solutionsweekly/
- Weekly contest solutionsbiweekly/
- Biweekly contest solutions
problems/
- Individual problem solutions
Click to expand
Click to expand
Click to expand
- 1. Two Sum
- 2. Add Two Numbers
- 3. Longest Substring Without Repeating Characters
- 4. Median of Two Sorted Arrays
- 5. Longest Palindromic Substring
- 6. Zigzag Conversion
- 7. Reverse Integer
- 8. String to Integer (atoi)
- 9. Palindrome Number
- 10. Regular Expression Matching
- 11. Container With Most Water
- 12. Integer to Roman
- 13. Roman to Integer
- 14. Longest Common Prefix
- 15. 3Sum
- 16. 3Sum Closest
- 17. Letter Combinations of a Phone Number
- 18. 4Sum
- 19. Remove Nth Node From End of List
- 20. Valid Parentheses
- 21. Merge Two Sorted Lists
- 22. Generate Parentheses
- 23. Merge k Sorted Lists
- 24. Swap Nodes in Pairs
- 25. Reverse Nodes in k-Group
- 26. Remove Duplicates from Sorted Array
- 27. Remove Element
- 28. Find the Index of the First Occurrence in a String
- 29. Divide Two Integers
- 30. Substring with Concatenation of All Words
- 31. Next Permutation
- 32. Longest Valid Parentheses
- 33. Search in Rotated Sorted Array
- 34. Find First and Last Position of Element in Sorted Array
- 35. Search Insert Position
- 36. Valid Sudoku
- 37. Sudoku Solver
- 38. Count and Say
- 39. Combination Sum
- 40. Combination Sum II
- 41. First Missing Positive
- 42. Trapping Rain Water
- 43. Multiply Strings
- 44. Wildcard Matching
- 45. Jump Game II
- 46. Permutations
- 47. Permutations II
- 48. Rotate Image
- 49. Group Anagrams
- 50. Pow(x, n)
- 51. N-Queens
- 52. N-Queens II
- 53. Maximum Subarray
- 54. Spiral Matrix
- 55. Jump Game
- 56. Merge Intervals
- 57. Insert Interval
- 58. Length of Last Word
- 59. Spiral Matrix II
- 61. Rotate List
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 66. Plus One
- 67. Add Binary
- 68. Text Justification
- 69. Sqrt(x)
- 70. Climbing Stairs
- 71. Simplify Path
- 72. Edit Distance
- 73. Set Matrix Zeroes
- 74. Search a 2D Matrix
- 75. Sort Colors
- 76. Minimum Window Substring
- 77. Combinations
- 78. Subsets
- 79. Word Search
- 80. Remove Duplicates from Sorted Array II
- 82. Remove Duplicates from Sorted List II
- 84. Largest Rectangle in Histogram
- 86. Partition List
- 88. Merge Sorted Array
- 91. Decode Ways
- 92. Reverse Linked List II
- 94. Binary Tree Inorder Traversal
- 95. Unique Binary Search Trees II
- 96. Unique Binary Search Trees
- 97. Interleaving String
- 98. Validate Binary Search Tree
- 100. Same Tree
- 101. Symmetric Tree
- 102. Binary Tree Level Order Traversal
- 103. Binary Tree Zigzag Level Order Traversal
- 104. Maximum Depth of Binary Tree
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 108. Convert Sorted Array to Binary Search Tree
- 112. Path Sum
- 114. Flatten Binary Tree to Linked List
- 117. Populating Next Right Pointers in Each Node II
- 118. Pascal's Triangle
- 119. Pascal's Triangle II
- 120. Triangle
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 123. Best Time to Buy and Sell Stock III
- 124. Binary Tree Maximum Path Sum
- 125. Valid Palindrome
- 127. Word Ladder
- 128. Longest Consecutive Sequence
- 129. Sum Root to Leaf Numbers
- 130. Surrounded Regions
- 131. Palindrome Partitioning
- 133. Clone Graph
- 134. Gas Station
- 135. Candy
- 136. Single Number
- 137. Single Number II
- 138. Copy List with Random Pointer
- 139. Word Break
- 141. Linked List Cycle
- 142. Linked List Cycle II
- 146. LRU Cache
- 147. Insertion Sort List
- 148. Sort List
- 149. Max Points on a Line
- 150. Evaluate Reverse Polish Notation
- 151. Reverse Words in a String
- 152. Maximum Product Subarray
- 153. Find Minimum in Rotated Sorted Array
- 155. Min Stack
- 160. Intersection of Two Linked Lists
- 162. Find Peak Element
- 164. Maximum Gap
- 167. Two Sum II - Input Array Is Sorted
- 169. Majority Element
- 172. Factorial Trailing Zeroes
- 173. Binary Search Tree Iterator
- 179. Largest Number
- 188. Best Time to Buy and Sell Stock IV
- 189. Rotate Array
- 190. Reverse Bits
- 191. Number of 1 Bits
- 198. House Robber
- 199. Binary Tree Right Side View
- 200. Number of Islands
- 201. Bitwise AND of Numbers Range
- 202. Happy Number
- 205. Isomorphic Strings
- 206. Reverse Linked List
- 207. Course Schedule
- 208. Implement Trie (Prefix Tree)
- 209. Minimum Size Subarray Sum
- 210. Course Schedule II
- 211. Design Add and Search Words Data Structure
- 212. Word Search II
- 213. House Robber II
- 214. Shortest Palindrome
- 215. Kth Largest Element in an Array
- 216. Combination Sum III
- 217. Contains Duplicate
- 219. Contains Duplicate II
- 221. Maximal Square
- 222. Count Complete Tree Nodes
- 224. Basic Calculator
- 226. Invert Binary Tree
- 228. Summary Ranges
- 229. Majority Element II
- 230. Kth Smallest Element in a BST
- 233. Number of Digit One
- 234. Palindrome Linked List
- 236. Lowest Common Ancestor of a Binary Tree
- 238. Product of Array Except Self
- 239. Sliding Window Maximum
- 240. Search a 2D Matrix II
- 241. Different Ways to Add Parentheses
- 242. Valid Anagram
- 264. Ugly Number II
- 274. H-Index
- 278. First Bad Version
- 279. Perfect Squares
- 283. Move Zeroes
- 287. Find the Duplicate Number
- 289. Game of Life
- 290. Word Pattern
- 295. Find Median from Data Stream
- 299. Bulls and Cows
- 300. Longest Increasing Subsequence
- 303. Range Sum Query - Immutable
- 309. Best Time to Buy and Sell Stock with Cooldown
- 313. Super Ugly Number
- 322. Coin Change
- 325. Maximum Size Subarray Sum Equals K
- 328. Odd Even Linked List
- 334. Increasing Triplet Subsequence
- 337. House Robber III
- 338. Counting Bits
- 343. Integer Break
- 344. Reverse String
- 345. Reverse Vowels of a String
- 347. Top K Frequent Elements
- 349. Intersection of Two Arrays
- 350. Intersection of Two Arrays II
- 357. Count Numbers with Unique Digits
- 368. Largest Divisible Subset
- 373. Find K Pairs with Smallest Sums
- 374. Guess Number Higher or Lower
- 375. Guess Number Higher or Lower II
- 376. Wiggle Subsequence
- 377. Combination Sum IV
- 380. Insert Delete GetRandom O(1)
- 383. Ransom Note
- 386. Lexicographical Numbers
- 387. First Unique Character in a String
- 392. Is Subsequence
- 394. Decode String
- 399. Evaluate Division
- 407. Trapping Rain Water II
- 409. Longest Palindrome
- 412. Fizz Buzz
- 416. Partition Equal Subset Sum
- 427. Construct Quad Tree
- 432. All O`one Data Structure
- 433. Minimum Genetic Mutation
- 435. Non-overlapping Intervals
- 437. Path Sum III
- 438. Find All Anagrams in a String
- 440. K-th Smallest in Lexicographical Order
- 443. String Compression
- 450. Delete Node in a BST
- 451. Sort Characters By Frequency
- 452. Minimum Number of Arrows to Burst Balloons
- 454. 4Sum II
- 455. Assign Cookies
- 485. Max Consecutive Ones
- 494. Target Sum
- 498. Diagonal Traverse
- 502. IPO
- 503. Next Greater Element II
- 509. Fibonacci Number
- 515. Find Largest Value in Each Tree Row
- 530. Minimum Absolute Difference in BST
- 539. Minimum Time Difference
- 543. Diameter of Binary Tree
- 547. Number of Provinces
- 557. Reverse Words in a String III
- 560. Subarray Sum Equals K
- 561. Array Partition
- 567. Permutation in String
- 581. Shortest Unsorted Continuous Subarray
- 594. Longest Harmonious Subsequence
- 599. Minimum Index Sum of Two Lists
- 600. Non-negative Integers without Consecutive Ones
- 605. Can Place Flowers
- 632. Smallest Range Covering Elements from K Lists
- 637. Average of Levels in Binary Tree
- 641. Design Circular Deque
- 643. Maximum Average Subarray I
- 649. Dota2 Senate
- 652. Find Duplicate Subtrees
- 670. Maximum Swap
- 680. Valid Palindrome II
- 684. Redundant Connection
- 689. Maximum Sum of 3 Non-Overlapping Subarrays
- 698. Partition to K Equal Sum Subsets
- 700. Search in a Binary Search Tree
- 704. Binary Search
- 705. Design HashSet
- 706. Design HashMap
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 724. Find Pivot Index
- 725. Split Linked List in Parts
- 729. My Calendar I
- 731. My Calendar II
- 735. Asteroid Collision
- 739. Daily Temperatures
- 746. Min Cost Climbing Stairs
- 747. Largest Number At Least Twice of Others
- 763. Partition Labels
- 769. Max Chunks To Make Sorted
- 771. Jewels and Stones
- 773. Sliding Puzzle
- 781. Rabbits in Forest
- 783. Minimum Distance Between BST Nodes
- 790. Domino and Tromino Tiling
- 796. Rotate String
- 802. Find Eventual Safe States
- 827. Making A Large Island
- 838. Push Dominoes
- 841. Keys and Rooms
- 847. Shortest Path Visiting All Nodes
- 862. Shortest Subarray with Sum at Least K
- 865. Smallest Subtree with all the Deepest Nodes
- 872. Leaf-Similar Trees
- 873. Length of Longest Fibonacci Subsequence
- 874. Walking Robot Simulation
- 875. Koko Eating Bananas
- 876. Middle of the Linked List
- 884. Uncommon Words from Two Sentences
- 889. Construct Binary Tree from Preorder and Postorder Traversal
- 898. Bitwise ORs of Subarrays
- 901. Online Stock Span
- 902. Numbers At Most N Given Digit Set
- 909. Snakes and Ladders
- 912. Sort an Array
- 916. Word Subsets
- 918. Maximum Sum Circular Subarray
- 921. Minimum Add to Make Parentheses Valid
- 933. Number of Recent Calls
- 951. Flip Equivalent Binary Trees
- 962. Maximum Width Ramp
- 974. Subarray Sums Divisible by K
- 983. Minimum Cost For Tickets
- 994. Rotting Oranges
- 1004. Max Consecutive Ones III
- 1007. Minimum Domino Rotations For Equal Row
- 1012. Numbers With Repeated Digits
- 1014. Best Sightseeing Pair
- 1025. Divisor Game
- 1028. Recover a Tree From Preorder Traversal
- 1051. Height Checker
- 1061. Lexicographically Smallest Equivalent String
- 1071. Greatest Common Divisor of Strings
- 1072. Flip Columns For Maximum Number of Equal Rows
- 1079. Letter Tile Possibilities
- 1092. Shortest Common Supersequence
- 1106. Parsing A Boolean Expression
- 1123. Lowest Common Ancestor of Deepest Leaves
- 1128. Number of Equivalent Domino Pairs
- 1137. N-th Tribonacci Number
- 1143. Longest Common Subsequence
- 1157. Online Majority Element In Subarray
- 1161. Maximum Level Sum of a Binary Tree
- 1200. Minimum Absolute Difference
- 1207. Unique Number of Occurrences
- 1233. Remove Sub-Folders from the Filesystem
- 1248. Count Number of Nice Subarrays
- 1261. Find Elements in a Contaminated Binary Tree
- 1267. Count Servers that Communicate
- 1268. Search Suggestions System
- 1277. Count Square Submatrices with All Ones
- 1290. Convert Binary Number in a Linked List to Integer
- 1295. Find Numbers with Even Number of Digits
- 1298. Maximum Candies You Can Get from Boxes
- 1310. XOR Queries of a Subarray
- 1318. Minimum Flips to Make a OR b Equal to c
- 1331. Rank Transform of an Array
- 1342. Number of Steps to Reduce a Number to Zero
- 1346. Check If N and Its Double Exist
- 1352. Product of the Last K Numbers
- 1353. Maximum Number of Events That Can Be Attended
- 1358. Number of Substrings Containing All Three Characters
- 1367. Linked List in Binary Tree
- 1368. Minimum Cost to Make at Least One Valid Path in a Grid
- 1371. Find the Longest Substring Containing Vowels in Even Counts
- 1372. Longest ZigZag Path in a Binary Tree
- 1381. Design a Stack With Increment Operation
- 1394. Find Lucky Integer in an Array
- 1399. Count Largest Group
- 1400. Construct K Palindrome Strings
- 1405. Longest Happy String
- 1408. String Matching in an Array
- 1415. The k-th Lexicographical String of All Happy Strings of Length n
- 1422. Maximum Score After Splitting a String
- 1431. Kids With the Greatest Number of Candies
- 1432. Max Difference You Can Get From Changing an Integer
- 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
- 1448. Count Good Nodes in Binary Tree
- 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence
- 1456. Maximum Number of Vowels in a Substring of Given Length
- 1462. Course Schedule IV
- 1466. Reorder Routes to Make All Paths Lead to the City Zero
- 1475. Final Prices With a Special Discount in a Shop
- 1480. Running Sum of 1d Array
- 1493. Longest Subarray of 1's After Deleting One Element
- 1497. Check If Array Pairs Are Divisible by k
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1514. Path with Maximum Probability
- 1524. Number of Sub-arrays With Odd Sum
- 1534. Count Good Triplets
- 1545. Find Kth Bit in Nth Binary String
- 1550. Three Consecutive Odds
- 1574. Shortest Subarray to be Removed to Make Array Sorted
- 1579. Remove Max Number of Edges to Keep Graph Fully Traversable
- 1590. Make Sum Divisible by P
- 1593. Split a String Into the Max Number of Unique Substrings
- 1639. Number of Ways to Form a Target String Given a Dictionary
- 1652. Defuse the Bomb
- 1657. Determine if Two Strings Are Close
- 1668. Maximum Repeating Substring
- 1671. Minimum Number of Removals to Make Mountain Array
- 1672. Richest Customer Wealth
- 1679. Max Number of K-Sum Pairs
- 1684. Count the Number of Consistent Strings
- 1695. Maximum Erasure Value
- 1700. Number of Students Unable to Eat Lunch
- 1717. Maximum Score From Removing Substrings
- 1718. Construct the Lexicographically Largest Valid Sequence
- 1726. Tuple with Same Product
- 1732. Find the Highest Altitude
- 1749. Maximum Absolute Sum of Any Subarray
- 1751. Maximum Number of Events That Can Be Attended II
- 1752. Check if Array Is Sorted and Rotated
- 1760. Minimum Limit of Balls in a Bag
- 1765. Map of Highest Peak
- 1768. Merge Strings Alternately
- 1769. Minimum Number of Operations to Move All Balls to Each Box
- 1780. Check if Number is a Sum of Powers of Three
- 1790. Check if One String Swap Can Make Strings Equal
- 1792. Maximum Average Pass Ratio
- 1800. Maximum Ascending Subarray Sum
- 1813. Sentence Similarity III
- 1829. Maximum XOR for Each Query
- 1857. Largest Color Value in a Directed Graph
- 1861. Rotating the Box
- 1862. Sum of Floored Pairs
- 1863. Sum of All Subset XOR Totals
- 1865. Finding Pairs With a Certain Sum
- 1894. Find the Student that Will Replace the Chalk
- 1900. The Earliest and Latest Rounds Where Players Compete
- 1910. Remove All Occurrences of a Substring
- 1920. Build Array from Permutation
- 1922. Count Good Numbers
- 1926. Nearest Exit from Entrance in Maze
- 1930. Unique Length-3 Palindromic Subsequences
- 1931. Painting a Grid With Three Different Colors
- 1937. Maximum Number of Points with Cost
- 1942. The Number of the Smallest Unoccupied Chair
- 1945. Sum of Digits of String After Convert
- 1947. Maximum Compatibility Score Sum
- 1948. Delete Duplicate Folders in System
- 1957. Delete Characters to Make Fancy String
- 1959. Minimum Total Space Wasted With K Resizing Operations
- 1963. Minimum Number of Swaps to Make the String Balanced
- 1974. Minimum Time to Type Word Using Special Typewriter
- 1975. Maximum Matrix Sum
- 1976. Number of Ways to Arrive at Destination
- 1980. Find Unique Binary String
- 1981. Minimize the Difference Between Target and Chosen Elements
- 1986. Minimum Number of Work Sessions to Finish the Tasks
- 1997. First Day Where You Have Been in All the Rooms
- 1998. GCD Sort of an Array
- 2002. Maximum Product of the Length of Two Palindromic Subsequences
- 2008. Maximum Earnings From Taxi
- 2014. Longest Subsequence Repeated k Times
- 2016. Maximum Difference Between Increasing Elements
- 2017. Grid Game
- 2022. Convert 1D Array Into 2D Array
- 2027. Minimum Moves to Convert String
- 2028. Find Missing Observations
- 2033. Minimum Operations to Make a Uni-Value Grid
- 2037. Minimum Number of Moves to Seat Everyone
- 2044. Count Number of Maximum Bitwise-OR Subsets
- 2054. Two Best Non-Overlapping Events
- 2063. Vowels of All Substrings
- 2064. Minimized Maximum of Products Distributed to Any Store
- 2070. Most Beautiful Item for Each Query
- 2071. Maximum Number of Tasks You Can Assign
- 2078. Two Furthest Houses With Different Colors
- 2081. Sum of k-Mirror Numbers
- 2086. Minimum Number of Food Buckets to Feed the Hamsters
- 2094. Finding 3-Digit Even Numbers
- 2095. Delete the Middle Node of a Linked List
- 2097. Valid Arrangement of Pairs
- 2099. Find Subsequence of Length K With the Largest Sum
- 2100. Find Good Days to Rob the Bank
- 2109. Adding Spaces to a String
- 2110. Number of Smooth Descent Periods of a Stock
- 2115. Find All Possible Recipes from Given Supplies
- 2116. Check if a Parentheses String Can Be Valid
- 2127. Maximum Employees to Be Invited to a Meeting
- 2130. Maximum Twin Sum of a Linked List
- 2131. Longest Palindrome by Concatenating Two Letter Words
- 2138. Divide a String Into Groups of Size k
- 2140. Solving Questions With Brainpower
- 2144. Minimum Cost of Buying Candies With Discount
- 2145. Count the Hidden Sequences
- 2160. Minimum Sum of Four Digit Number After Splitting Digits
- 2161. Partition Array According to Given Pivot
- 2163. Minimum Difference in Sums After Removal of Elements
- 2176. Count Equal and Divisible Pairs in an Array
- 2179. Count Good Triplets in an Array
- 2182. Construct String With Repeat Limit
- 2185. Counting Words With a Given Prefix
- 2200. Find All K-Distant Indices in an Array
- 2206. Divide Array Into Equal Pairs
- 2210. Count Hills and Valleys in an Array
- 2215. Find the Difference of Two Arrays
- 2220. Minimum Bit Flips to Convert Number
- 2222. Number of Ways to Select Buildings
- 2224. Minimum Number of Operations to Convert Time
- 2226. Maximum Candies Allocated to K Children
- 2257. Count Unguarded Cells in the Grid
- 2259. Remove Digit From Number to Maximize Result
- 2266. Count Number of Texts
- 2270. Number of Ways to Split Array
- 2275. Largest Combination With Bitwise AND Greater Than Zero
- 2290. Minimum Obstacle Removal to Reach Corner
- 2294. Partition Array Such That Maximum Difference Is K
- 2300. Successful Pairs of Spells and Potions
- 2302. Count Subarrays With Score Less Than K
- 2311. Longest Binary Subsequence Less Than or Equal to K
- 2320. Count Number of Ways to Place Houses
- 2322. Minimum Score After Removals on a Tree
- 2326. Spiral Matrix IV
- 2327. Number of People Aware of a Secret
- 2335. Minimum Amount of Time to Fill Cups
- 2336. Smallest Number in Infinite Set
- 2337. Move Pieces to Obtain a String
- 2338. Count the Number of Ideal Arrays
- 2342. Max Sum of a Pair With Equal Sum of Digits
- 2343. Query Kth Smallest Trimmed Number
- 2349. Design a Number Container System
- 2352. Equal Row and Column Pairs
- 2357. Make Array Zero by Subtracting Equal Amounts
- 2359. Find Closest Node to Given Two Nodes
- 2364. Count Number of Bad Pairs
- 2369. Check if There is a Valid Partition For The Array
- 2375. Construct Smallest Number From DI String
- 2379. Minimum Recolors to Get K Consecutive Black Blocks
- 2381. Shifting Letters II
- 2383. Minimum Hours of Training to Win a Competition
- 2389. Longest Subsequence With Limited Sum
- 2390. Removing Stars From a String
- 2401. Longest Nice Subarray
- 2402. Meeting Rooms III
- 2406. Divide Intervals Into Minimum Number of Groups
- 2410. Maximum Matching of Players With Trainers
- 2411. Smallest Subarrays With Maximum Bitwise OR
- 2415. Reverse Odd Levels of Binary Tree
- 2416. Sum of Prefix Scores of Strings
- 2419. Longest Subarray With Maximum Bitwise AND
- 2425. Bitwise XOR of All Pairings
- 2429. Minimize XOR
- 2434. Using a Robot to Print the Lexicographically Smallest String
- 2444. Count Subarrays With Fixed Bounds
- 2458. Height of Binary Tree After Subtree Removal Queries
- 2460. Apply Operations to an Array
- 2461. Maximum Sum of Distinct Subarrays With Length K
- 2462. Total Cost to Hire K Workers
- 2463. Minimum Total Distance Traveled
- 2466. Count Ways To Build Good Strings
- 2467. Most Profitable Path in a Tree
- 2471. Minimum Number of Operations to Sort a Binary Tree by Level
- 2490. Circular Sentence
- 2491. Divide Players Into Teams of Equal Skill
- 2493. Divide Nodes Into the Maximum Number of Groups
- 2501. Longest Square Streak in an Array
- 2503. Maximum Number of Points From Grid Queries
- 2516. Take K of Each Character From Left and Right
- 2523. Closest Prime Numbers in Range
- 2529. Maximum Count of Positive Integer and Negative Integer
- 2530. Maximal Score After Applying K Operations
- 2537. Count the Number of Good Subarrays
- 2542. Maximum Subsequence Score
- 2551. Put Marbles in Bags
- 2554. Maximum Number of Integers to Choose From a Range I
- 2558. Take Gifts From the Richest Pile
- 2559. Count Vowel Strings in Ranges
- 2560. House Robber IV
- 2561. Rearranging Fruits
- 2563. Count the Number of Fair Pairs
- 2565. Subsequence With the Minimum Score
- 2566. Maximum Difference by Remapping a Digit
- 2570. Merge Two 2D Arrays by Summing Values
- 2577. Minimum Time to Visit a Cell In a Grid
- 2578. Split With Minimum Sum
- 2579. Count Total Number of Colored Cells
- 2583. Kth Largest Sum in a Binary Tree
- 2588. Count the Number of Beautiful Subarrays
- 2591. Distribute Money to Maximum Children
- 2593. Find Score of an Array After Marking All Elements
- 2594. Minimum Time to Repair Cars
- 2600. K Items With the Maximum Sum
- 2601. Prime Subtraction Operation
- 2616. Minimize the Maximum Difference of Pairs
- 2641. Cousins in Binary Tree II
- 2652. Sum Multiples
- 2656. Maximum Sum With Exactly K Elements
- 2657. Find the Prefix Common Array of Two Arrays
- 2658. Maximum Number of Fish in a Grid
- 2661. First Completely Painted Row or Column
- 2683. Neighboring Bitwise XOR
- 2684. Maximum Number of Moves in a Grid
- 2685. Count the Number of Complete Components
- 2696. Minimum String Length After Removing Substrings
- 2697. Lexicographically Smallest Palindrome
- 2698. Find the Punishment Number of an Integer
- 2706. Buy Two Chocolates
- 2707. Extra Characters in a String
- 2762. Continuous Subarrays
- 2779. Maximum Beauty of an Array After Applying Operation
- 2780. Minimum Index of a Valid Split
- 2799. Count Complete Subarrays in an Array
- 2807. Insert Greatest Common Divisors in Linked List
- 2818. Apply Operations to Maximize Score
- 2825. Make String a Subsequence Using Cyclic Increments
- 2843. Count Symmetric Integers
- 2845. Count of Interesting Subarrays
- 2872. Maximum Number of K-Divisible Components
- 2873. Maximum Value of an Ordered Triplet I
- 2874. Maximum Value of an Ordered Triplet II
- 2894. Divisible and Non-divisible Sums Difference
- 2900. Longest Unequal Adjacent Groups Subsequence I
- 2901. Longest Unequal Adjacent Groups Subsequence II
- 2914. Minimum Number of Changes to Make Binary String Beautiful
- 2918. Minimum Equal Sum of Two Arrays After Replacing Zeros
- 2924. Find Champion II
- 2928. Distribute Candies Among Children I
- 2929. Distribute Candies Among Children II
- 2938. Separate Black and White Balls
- 2940. Find Building Where Alice and Bob Can Meet
- 2942. Find Words Containing Character
- 2947. Count Beautiful Substrings I
- 2948. Make Lexicographically Smallest Array by Swapping Elements
- 2949. Count Beautiful Substrings II
- 2962. Count Subarrays Where Max Element Appears at Least K Times
- 2965. Find Missing and Repeated Values
- 2966. Divide Array Into Arrays With Max Difference
- 2970. Count the Number of Incremovable Subarrays I
- 2972. Count the Number of Incremovable Subarrays II
- 2981. Find Longest Special Substring That Occurs Thrice I
- 2999. Count the Number of Powerful Integers
- 3011. Find if Array Can Be Sorted
- 3024. Type of Triangle
- 3042. Count Prefix and Suffix Pairs I
- 3043. Find the Length of the Longest Common Prefix
- 3065. Minimum Operations to Exceed Threshold Value I
- 3066. Minimum Operations to Exceed Threshold Value II
- 3068. Find the Maximum Sum of Node Values
- 3085. Minimum Deletions to Make String K-Special
- 3097. Shortest Subarray With OR at Least K II
- 3105. Longest Strictly Increasing or Strictly Decreasing Subarray
- 3108. Minimum Cost Walk in Weighted Graph
- 3133. Minimum Array End
- 3136. Valid Word
- 3151. Special Array I
- 3152. Special Array II
- 3160. Find the Number of Distinct Colors Among the Balls
- 3163. String Compression III
- 3169. Count Days Without Meetings
- 3170. Lexicographically Minimum String After Removing Stars
- 3174. Clear Digits
- 3191. Minimum Operations to Make Binary Array Elements Equal to One I
- 3201. Find the Maximum Length of Valid Subsequence I
- 3202. Find the Maximum Length of Valid Subsequence II
- 3203. Find Minimum Diameter After Merging Two Trees
- 3208. Alternating Groups II
- 3217. Delete Nodes From Linked List Present in Array
- 3223. Minimum Length of String After Operations
- 3243. Shortest Distance After Road Addition Queries I
- 3254. Find the Power of K-Size Subarrays I
- 3264. Final Array State After K Multiplication Operations I
- 3272. Find the Count of Good Integers
- 3274. Check if Two Chessboard Squares Have the Same Color
- 3275. K-th Nearest Obstacle Queries
- 3276. Select Cells in Grid With Maximum Score
- 3277. Maximum XOR Score Subarray Queries
- 3304. Find the K-th Character in String Game I
- 3306. Count of Substrings Containing Every Vowel and K Consonants II
- 3307. Find the K-th Character in String Game II
- 3330. Find the Original Typed String I
- 3333. Find the Original Typed String II
- 3335. Total Characters in String After Transformations I
- 3337. Total Characters in String After Transformations II
- 3341. Find Minimum Time to Reach Last Room I
- 3342. Find Minimum Time to Reach Last Room II
- 3343. Count Number of Balanced Permutations
- 3355. Zero Array Transformation I
- 3356. Zero Array Transformation II
- 3362. Zero Array Transformation III
- 3364. Minimum Positive Sum Subarray
- 3365. Rearrange K Substrings to Form Target String
- 3366. Minimum Array Sum
- 3367. Maximize Sum of Weights after Edge Removals
- 3370. Smallest Number With All Set Bits
- 3371. Identify the Largest Outlier in an Array
- 3372. Maximize the Number of Target Nodes After Connecting Trees I
- 3373. Maximize the Number of Target Nodes After Connecting Trees II
- 3375. Minimum Operations to Make Array Values Equal to K
- 3379. Transformed Array
- 3380. Maximum Area Rectangle With Point Constraints I
- 3381. Maximum Subarray Sum With Length Divisible by K
- 3382. Maximum Area Rectangle With Point Constraints II
- 3392. Count Subarrays of Length Three With a Condition
- 3394. Check if Grid can be Cut into Sections
- 3396. Minimum Number of Operations to Make Elements in Array Distinct
- 3423. Maximum Difference Between Adjacent Elements in a Circular Array
- 3425. Longest Special Path
- 3439. Reschedule Meetings for Maximum Free Time I
- 3440. Reschedule Meetings for Maximum Free Time II
- 3612. Process String with Special Operations I
- Total Problems Solved: 692
- Weekly Contests Participated: 22
- Biweekly Contests Participated: 3
- C#
- Data Structures & Algorithms
- Problem Solving
This project is for educational purposes. All solutions are my own work.
Built with β€οΈ by Le Doan Cong Anh