A collection of LeetCode solutions implemented in TypeScript. This repository contains my solutions to various LeetCode problems, organized by problem ID and name.
Each problem is organized in its own directory following the format:
{problem_id}-{problem_name}/
βββ README.md # Problem description and constraints
βββ Solution.md # Solution explanation and approach
βββ {problem_id}-{problem_name}.ts # TypeScript solution implementation
- Navigate to the problem directory you're interested in
- Read the
README.md
for problem description and constraints - Check the
Solution.md
for detailed solution explanation, approach, and complexity analysis - Review the
{problem_id}-{problem_name}.ts
file for the TypeScript implementation
π Arrays
-
3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
-
3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
-
3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
-
3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
-
3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
-
1498. Number of Subsequences That Satisfy the Given Sum Condition
-
3529. Count Cells in Overlapping Horizontal and Vertical Substrings
-
3572. Maximize Y Sum by Picking a Triplet of Distinct X Values
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements in a Circular Array
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3505. Minimum Operations to Make Elements Within K Subarrays Equal
-
3584. Maximum Product of First and Last Elements of a Subsequence
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements In A Circular Array
-
3505. Minimum Operations To Make Elements Within K Subarrays Equal
-
3509. Maximum Product Of Subsequences With An Alternating Sum Equal To K
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements In A Circular Array
-
3505. Minimum Operations To Make Elements Within K Subarrays Equal
-
3509. Maximum Product Of Subsequences With An Alternating Sum Equal To K
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements In A Circular Array
-
3505. Minimum Operations To Make Elements Within K Subarrays Equal
-
3509. Maximum Product Of Subsequences With An Alternating Sum Equal To K
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements In A Circular Array
-
3505. Minimum Operations To Make Elements Within K Subarrays Equal
-
3509. Maximum Product Of Subsequences With An Alternating Sum Equal To K
-
3405. Count The Number Of Arrays With K Matching Adjacent Elements
-
3423. Maximum Difference Between Adjacent Elements In A Circular Array
-
3505. Minimum Operations To Make Elements Within K Subarrays Equal
-
3509. Maximum Product Of Subsequences With An Alternating Sum Equal To K
-
3529. Count Cells In Overlapping Horizontal And Vertical Substrings
-
3529. Count Cells In Overlapping Horizontal And Vertical Substrings
-
3529. Count Cells In Overlapping Horizontal And Vertical Substrings
-
3529. Count Cells In Overlapping Horizontal And Vertical Substrings
-
3529. Count Cells In Overlapping Horizontal And Vertical Substrings
-
1498. Number Of Subsequences That Satisfy The Given Sum Condition
-
1498. Number Of Subsequences That Satisfy The Given Sum Condition
-
1498. Number Of Subsequences That Satisfy The Given Sum Condition
-
1498. Number Of Subsequences That Satisfy The Given Sum Condition
-
1498. Number Of Subsequences That Satisfy The Given Sum Condition
π€ Strings
-
2434. Using a Robot to Print the Lexicographically Smallest String
-
3306. Count of Substrings Containing Every Vowel and K Consonants II
-
3403. Find the Lexicographically Largest String from the Box I
-
3306. Count Of Substrings Containing Every Vowel And K Consonants Ii
-
3403. Find The Lexicographically Largest String From The Box I
-
3598. Longest Common Prefix Between Adjacent Strings After Removals
-
3306. Count Of Substrings Containing Every Vowel And K Consonants Ii
-
3403. Find The Lexicographically Largest String From The Box I
-
3598. Longest Common Prefix Between Adjacent Strings After Removals
-
3306. Count Of Substrings Containing Every Vowel And K Consonants Ii
-
3403. Find The Lexicographically Largest String From The Box I
-
3598. Longest Common Prefix Between Adjacent Strings After Removals
-
3306. Count Of Substrings Containing Every Vowel And K Consonants Ii
-
3403. Find The Lexicographically Largest String From The Box I
-
3598. Longest Common Prefix Between Adjacent Strings After Removals
-
3306. Count Of Substrings Containing Every Vowel And K Consonants Ii
-
3403. Find The Lexicographically Largest String From The Box I
-
3598. Longest Common Prefix Between Adjacent Strings After Removals
π³ Trees & Graphs
-
3372. Maximize the Number of Target Nodes After Connecting Trees I
-
3373. Maximize the Number of Target Nodes After Connecting Trees II
-
3372. Maximize The Number Of Target Nodes After Connecting Trees I
-
3373. Maximize The Number Of Target Nodes After Connecting Trees Ii
-
3372. Maximize The Number Of Target Nodes After Connecting Trees I
-
3373. Maximize The Number Of Target Nodes After Connecting Trees Ii
-
3372. Maximize The Number Of Target Nodes After Connecting Trees I
-
3373. Maximize The Number Of Target Nodes After Connecting Trees Ii
-
3372. Maximize The Number Of Target Nodes After Connecting Trees I
-
3373. Maximize The Number Of Target Nodes After Connecting Trees Ii
-
3372. Maximize The Number Of Target Nodes After Connecting Trees I
-
3373. Maximize The Number Of Target Nodes After Connecting Trees Ii
π Hash Tables & Dictionaries
π’ Math & Bit Manipulation
- 0002. Add Two Numbers
- 0118. Pascals Triangle
- 0120. Triangle
- 0812. Largest Triangle Area
- 0909. Snakes And Ladders
- 1304. Find N Unique Integers Sum Up To Zero
- 1317. Convert Integer To The Sum Of Two No Zero Integers
- 2081. Sum Of K Mirror Numbers
- 2163. Minimum Difference In Sums After Removal Of Elements
- 2197. Replace Non Coprime Numbers In Array
- 2221. Find Triangular Sum Of An Array
- 2235. Add Two Integers
- 2787. Ways To Express An Integer As Sum Of Powers
- 2918. Minimum Equal Sum Of Two Arrays After Replacing Zeros
- 3068. Find The Maximum Sum Of Node Values
- 3487. Maximum Unique Subarray Sum After Deletion
- 3509. Maximum Product of Subsequences with an Alternating Sum Equal to K
- 3512. Minimum Operations To Make Array Sum Divisible By K
- 3533. Concatenated Divisibility
- 3539. Find Sum Of Array Product Of Magical Sequences
- 3556. Sum Of Largest Prime Substrings
- 3572. Maximize Ysum By Picking A Triplet Of Distinct Xvalues
- 3574. Maximize Subarray Gcd Score
- 3588. Find Maximum Area Of A Triangle
- 3589. Count Prime Gap Balanced Subarrays
- 3602. Hexadecimal And Hexatrigesimal Conversion
- 3701. Compute Alternating Sum
- 0118. Pascals Triangle
- 0812. Largest Triangle Area
- 2197. Replace Non Coprime Numbers In Array
- 3411. Maximum Subarray With Equal Products
- 3574. Maximize Subarray Gcd Score
- 3591. Check If Any Element Has Prime Frequency
- 0118. Pascals Triangle
- 0812. Largest Triangle Area
- 2197. Replace Non Coprime Numbers In Array
- 3411. Maximum Subarray With Equal Products
- 3574. Maximize Subarray Gcd Score
- 3591. Check If Any Element Has Prime Frequency
- 0118. Pascals Triangle
- 0812. Largest Triangle Area
- 2197. Replace Non Coprime Numbers In Array
- 3411. Maximum Subarray With Equal Products
- 3574. Maximize Subarray Gcd Score
- 3591. Check If Any Element Has Prime Frequency
- 0118. Pascals Triangle
- 0812. Largest Triangle Area
- 2197. Replace Non Coprime Numbers In Array
- 3411. Maximum Subarray With Equal Products
- 3574. Maximize Subarray Gcd Score
- 3591. Check If Any Element Has Prime Frequency
- 0118. Pascals Triangle
- 0812. Largest Triangle Area
- 2197. Replace Non Coprime Numbers In Array
- 3411. Maximum Subarray With Equal Products
- 3574. Maximize Subarray Gcd Score
- 3591. Check If Any Element Has Prime Frequency
πΎ System Design
π SQL
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3584. Maximum Product Of First And Last Elements Of A Subsequence
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3584. Maximum Product Of First And Last Elements Of A Subsequence
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3584. Maximum Product Of First And Last Elements Of A Subsequence
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3584. Maximum Product Of First And Last Elements Of A Subsequence
-
2434. Using A Robot To Print The Lexicographically Smallest String
-
3480. Maximize Subarrays After Removing One Conflicting Pair
-
3584. Maximum Product Of First And Last Elements Of A Subsequence
While this is primarily my personal collection of solutions, I welcome any suggestions or improvements. Feel free to:
- Report bugs or issues
- Suggest optimizations
- Share alternative solutions
This project is licensed under the MIT License - see the LICENSE file for details.
Solutions are automatically synced using LeetHub 3.0, a Chrome extension that automatically pushes your LeetCode solutions to GitHub.