Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

codedby-aadarsh/dsa-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

488 Commits

Repository files navigation

📚 Data Structures & Algorithms Practice

Welcome to my Data Structures and Algorithms (DSA) practice repository!

This repo contains my personal journey of solving coding problems while learning and improving problem-solving skills in computer science fundamentals.

🚀 Purpose

Strengthen my understanding of algorithms and data structures

Prepare for coding interviews

Build a long-term coding habit

Keep a track of problems solved across different platforms like LeetCode, GeeksforGeeks, Codeforces, etc.

🗂️ Folder Structure

dsa-practice/

├── README.md

├── reverseLinkedList.py

├── twoSum.py

├── factorial.py └── ...

Each folder contains solutions related to that specific topic/category.

📌 Topics need to cover

✅ Arrays & Strings

✅ Linked Lists

✅ Stacks & Queues

✅ Trees

✅ Graphs

✅ Recursion & Backtracking

✅ Sorting & Searching

✅ Dynamic Programming

✅ Miscellaneous Challenges

✏️ Naming Convention

Each file name corresponds to the problem title, and solutions are written in Python mainly.

✨ Future Goals Complete major DSA topics

Attempt 200+ DSA problems by [15 july 2025]

Start contributing to open-source DSA projects

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0035-search-insert-position
0049-group-anagrams
0066-plus-one
0074-search-a-2d-matrix
0088-merge-sorted-array
0128-longest-consecutive-sequence
0136-single-number
0150-evaluate-reverse-polish-notation
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0217-contains-duplicate
0238-product-of-array-except-self
0268-missing-number
0287-find-the-duplicate-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0414-third-maximum-number
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0540-single-element-in-a-sorted-array
0566-reshape-the-matrix
0792-binary-search
0861-flipping-an-image
0882-peak-index-in-a-mountain-array
0883-car-fleet
0898-transpose-matrix
0907-koko-eating-bananas
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1476-count-negative-numbers-in-a-sorted-matrix
1482-how-many-numbers-are-smaller-than-the-current-number
1505-create-target-array-in-the-given-order
1528-kids-with-the-greatest-number-of-candies
1603-running-sum-of-1d-array
1635-number-of-good-pairs
1646-kth-missing-positive-number
1651-shuffle-string
1677-matrix-diagonal-sum
1781-check-if-two-string-arrays-are-equivalent
1791-richest-customer-wealth
1833-find-the-highest-altitude
1899-count-items-matching-a-rule
2058-concatenation-of-array
2099-number-of-strings-that-appear-as-substrings-in-word

Prefix Sum

0238-product-of-array-except-self
1603-running-sum-of-1d-array
1833-find-the-highest-altitude

Simulation

0566-reshape-the-matrix
0657-robot-return-to-origin
0861-flipping-an-image
0898-transpose-matrix
1505-create-target-array-in-the-given-order
2058-concatenation-of-array

Matrix

0074-search-a-2d-matrix
0566-reshape-the-matrix
0861-flipping-an-image
0898-transpose-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1677-matrix-diagonal-sum
1791-richest-customer-wealth

Hash Table

0001-two-sum
0049-group-anagrams
0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
1023-time-based-key-value-store
1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs

Sorting

0049-group-anagrams
0088-merge-sorted-array
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0414-third-maximum-number
0455-assign-cookies
0883-car-fleet
1482-how-many-numbers-are-smaller-than-the-current-number

Counting Sort

0169-majority-element
0347-top-k-frequent-elements
1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs
1823-determine-if-string-halves-are-alike

Math

0002-add-two-numbers
0007-reverse-integer
0066-plus-one
0150-evaluate-reverse-polish-notation
0268-missing-number
0367-valid-perfect-square
0441-arranging-coins
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1635-number-of-good-pairs

String

0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0049-group-anagrams
0058-length-of-last-word
0125-valid-palindrome
0242-valid-anagram
0557-reverse-words-in-a-string-iii
0657-robot-return-to-origin
0686-repeated-string-match
0742-to-lower-case
1023-time-based-key-value-store
1078-remove-outermost-parentheses
1205-defanging-an-ip-address
1434-decrypt-string-from-alphabet-to-integer-mapping
1651-shuffle-string
1781-check-if-two-string-arrays-are-equivalent
1797-goal-parser-interpretation
1823-determine-if-string-halves-are-alike
1894-merge-strings-alternately
1899-count-items-matching-a-rule
1910-check-if-binary-string-has-at-most-one-segment-of-ones
2099-number-of-strings-that-appear-as-substrings-in-word
2128-reverse-prefix-of-word

Two Pointers

0011-container-with-most-water
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0061-rotate-list
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0234-palindrome-linked-list
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0528-swapping-nodes-in-a-linked-list
0557-reverse-words-in-a-string-iii
0861-flipping-an-image
0908-middle-of-the-linked-list
1894-merge-strings-alternately
2128-reverse-prefix-of-word

Bit Manipulation

0136-single-number
0268-missing-number
0287-find-the-duplicate-number
0861-flipping-an-image

Divide and Conquer

0004-median-of-two-sorted-arrays
0169-majority-element
0347-top-k-frequent-elements

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0035-search-insert-position
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0268-missing-number
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0441-arranging-coins
0540-single-element-in-a-sorted-array
0792-binary-search
0882-peak-index-in-a-mountain-array
0907-koko-eating-bananas
1023-time-based-key-value-store
1476-count-negative-numbers-in-a-sorted-matrix
1646-kth-missing-positive-number

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0572-subtree-of-another-tree
0686-repeated-string-match

Stack

0020-valid-parentheses
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0234-palindrome-linked-list
0883-car-fleet
1078-remove-outermost-parentheses
2128-reverse-prefix-of-word

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0061-rotate-list
0083-remove-duplicates-from-sorted-list
0092-reverse-linked-list-ii
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0528-swapping-nodes-in-a-linked-list
0838-design-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list

Design

0155-min-stack
0838-design-linked-list
1023-time-based-key-value-store

Monotonic Stack

0883-car-fleet

Heap (Priority Queue)

0347-top-k-frequent-elements

Bucket Sort

0347-top-k-frequent-elements

Quickselect

0347-top-k-frequent-elements

Union Find

0128-longest-consecutive-sequence

Greedy

0011-container-with-most-water
0455-assign-cookies

Tree

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0226-invert-binary-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree

Depth-First Search

0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0226-invert-binary-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0226-invert-binary-tree

Binary Tree

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0226-invert-binary-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

About

well here in this repo, ill be submitting the solution of the leetcode problems which i solved during my dsa and leetcode journey.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /