Skip to content

Niteshkamat11/DSA-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

DSA-Practice

Welcome to my Data Structures and Algorithms (DSA) practice repository!
This repository contains solutions to problems from NeetCode 150 and LeetCode to improve my problem-solving skills.


πŸ“‚ Table of Contents (NeetCode 150 Categories)

  1. Arrays & Hashing
  2. Two Pointers
  3. Sliding Window
  4. Stack
  5. Binary Search
  6. Linked List
  7. Trees
  8. Tries
  9. Backtracking
  10. Heap / Priority Queue
  11. Graphs
  12. 1D Dynamic Programming
  13. Intervals
  14. Greedy
  15. Advanced Graphs
  16. 2D Dynamic Programming
  17. Bit Manipulation
  18. Math & Geometry

πŸ“Š Progress (Arrays & Hashing)

  • Total Solved: 4 / 9
    • Easy: 3 Easy
    • Medium: 1 Medium

🧩 Arrays & Hashing

1. Valid Anagram

  • Difficulty: Easy
  • Problem Link: NeetCode
  • Approach:
    • Use a hash map (array) to count character frequencies in s.
    • Decrease count for each character in t.
    • If all counts reduce to zero β†’ strings are anagrams.
  • Time Complexity: O(n + m)
  • Space Complexity: O(1)
  • Solution: anagram.js

2. Contains Duplicate

  • Difficulty: Easy
  • Problem Link: NeetCode
  • Approach:
    • Use a Set to track seen numbers.
    • Return true if a duplicate is found, otherwise false.
  • Time Complexity: O(n)
  • Space Complexity: O(n)
  • Solution: duplication.js

3. Group Anagrams

  • Difficulty: Medium
  • Problem Link: NeetCode
  • Approach:
    • Count character frequencies for each word and use as a key in a Map.
    • Group words with the same key together.
  • Solution: groupanagram.js

4. Two Sum

  • Difficulty: Easy
  • Problem Link: LeetCode
  • Approach:
    • Use a Map to store seen numbers and their indices.
    • For each number, check if target - current exists.
    • Return indices if found.
  • Time Complexity: O(n)
  • Space Complexity: O(n)
  • Solution: twosum.js

πŸ› οΈ Tools & Technologies

JavaScript Node.js Neovim Git Fedora


πŸ“Œ How to Use

  1. Clone the repository:
git clone https://github.com/Nitesh0434/DSA-Practice.git
# Fri Sep 12 11:11:44 PM +0545 2025

About

LeetCode/Neetcode problem practice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published