This repository contains my solutions to LeetCode problems solved during my Data Structures and Algorithms (DSA) practice journey.
The goal of this repository is to:
- Improve problem-solving skills
- Strengthen understanding of Data Structures and Algorithms
- Track my coding progress
- Prepare for coding interviews and competitive programming
All solutions are implemented in Java.
Each file contains the solution to a specific LeetCode problem.
Example:
ThreeSum.java
ValidPalindrome2.java
StackAddAtBottom.java
- Arrays
- Strings
- Linked Lists
- Stacks
- Queues
- Trees
- Hashing
- Recursion
- Two Pointers
- Sliding Window
- Dynamic Programming
- Greedy Algorithms
For each problem, I try to:
- Understand the problem statement.
- Develop a brute force program first and then later find an optimized approach.
- Implement the solution in Java.
- Analyze time and space complexity.
I will continuously update this repository as I solve more LeetCode problems.
Feel free to explore the solutions and suggest improvements.
| 3737-count-subarrays-with-majority-element-i |
| 3739-count-subarrays-with-majority-element-ii |
| 3737-count-subarrays-with-majority-element-i |
| 3739-count-subarrays-with-majority-element-ii |
| 3737-count-subarrays-with-majority-element-i |
| 3739-count-subarrays-with-majority-element-ii |
| 3016-minimum-number-of-pushes-to-type-word-ii |
| 3312-sorted-gcd-pair-queries |
| 3518-smallest-palindromic-rearrangement-ii |
| 3737-count-subarrays-with-majority-element-i |
| 0610-triangle-judgement |
| 0619-biggest-single-number |
| 1731-the-number-of-employees-which-report-to-each-employee |
| 1789-primary-department-for-each-employee |
| 1291-sequential-digits |
| 3020-find-the-maximum-number-of-elements-in-subset |
| 3499-maximize-active-section-with-trade-i |
| 3514-number-of-unique-xor-triplets-ii |
| 0071-simplify-path |
| 1081-smallest-subsequence-of-distinct-characters |
| 2492-minimum-score-of-a-path-between-two-cities |
| 2685-count-the-number-of-complete-components |
| 2812-find-the-safest-path-in-a-grid |
| 3286-find-a-safe-walk-through-a-grid |
| 2492-minimum-score-of-a-path-between-two-cities |
| 2685-count-the-number-of-complete-components |
| 2812-find-the-safest-path-in-a-grid |
| 3532-path-existence-queries-in-a-graph-i |
| 1464-maximum-product-of-two-elements-in-an-array |
| 2812-find-the-safest-path-in-a-grid |
| 3286-find-a-safe-walk-through-a-grid |
| 3620-network-recovery-pathways |
| 1301-number-of-paths-with-max-score |
| 2812-find-the-safest-path-in-a-grid |
| 3286-find-a-safe-walk-through-a-grid |
| 3286-find-a-safe-walk-through-a-grid |
| 3620-network-recovery-pathways |
| 1929-concatenation-of-array |
| 3867-sum-of-gcd-of-formed-pairs |
| 1301-number-of-paths-with-max-score |
| 3336-find-the-number-of-subsequences-with-equal-gcd |
| 3534-path-existence-queries-in-a-graph-ii |
| 3620-network-recovery-pathways |
| 3620-network-recovery-pathways |
| 2492-minimum-score-of-a-path-between-two-cities |
| 2685-count-the-number-of-complete-components |
| 0137-single-number-ii |
| 3513-number-of-unique-xor-triplets-i |
| 3514-number-of-unique-xor-triplets-ii |
| 3534-path-existence-queries-in-a-graph-ii |
| 1979-find-greatest-common-divisor-of-array |
| 3312-sorted-gcd-pair-queries |
| 3336-find-the-number-of-subsequences-with-equal-gcd |
| 3658-gcd-of-odd-and-even-sums |
| 3867-sum-of-gcd-of-formed-pairs |
| 3312-sorted-gcd-pair-queries |
| 3518-smallest-palindromic-rearrangement-ii |
| 1081-smallest-subsequence-of-distinct-characters |
| 1365-how-many-numbers-are-smaller-than-the-current-number |
| 0061-rotate-list |
| 0083-remove-duplicates-from-sorted-list |