Skip to content

neetcode-dsa-roadmap contains solutions to the most essential Data Structures and Algorithms problems curated by the NeetCode platform. The solutions are implemented in Python and organized based on the structured NeetCode roadmap, covering key topics like arrays, trees, dynamic programming, and graphs.

Notifications You must be signed in to change notification settings

bhanuprasadChesetti/neetcode-dsa-roadmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

NeetCode DSA Roadmap

This repository contains solutions to the 150 essential Data Structures and Algorithms problems curated by the NeetCode platform. The problems are solved in Python and organized into separate folders, following the structured roadmap as seen on the NeetCode Roadmap. This roadmap covers a wide range of algorithmic topics commonly tested in technical interviews at top companies.

Topics Covered

This repository is based on the NeetCode roadmap, covering the following core topics:

  1. Arrays & Hashing: Efficient manipulation and lookup of arrays.
  2. Two Pointers: Optimized algorithms for processing arrays and linked lists.
  3. Stack: Use of LIFO structures in various problem-solving scenarios.
  4. Sliding Window: Techniques for solving problems that require processing continuous subarrays.
  5. Binary Search: Classic and advanced search techniques over sorted data.
  6. Linked List: Manipulating nodes and solving problems related to linked lists.
  7. Trees: Solving problems using binary trees, binary search trees, and more.
  8. Tries: Efficient data structures for word and prefix problems.
  9. Backtracking: Recursion-based approaches for solving complex search problems.
  10. Heap / Priority Queue: Optimized data retrieval in constant time using heaps.
  11. Graphs: Fundamental and advanced graph algorithms for traversals and searches.
  12. Intervals: Problems based on overlapping intervals.
  13. Greedy Algorithms: Problem-solving strategies that involve making optimal choices at each step.
  14. 1D Dynamic Programming (1D DP): Solving problems using memoization or tabulation techniques.
  15. 2D Dynamic Programming (2D DP): Extending DP concepts to 2D structures.
  16. Bit Manipulation: Efficient problem-solving using bitwise operations.
  17. Math & Geometry: Problems involving mathematical reasoning and geometric properties.

Repository Structure

The repository is organized into directories based on different problem categories. Each category corresponds to a section in the NeetCode roadmap. Inside each folder, you will find Python solutions for the respective problems, with problem names as filenames. Here's the directory structure:

├── Arrays & Hashing/
│   ├── contains-duplicate.py
│   ├── valid-anagram.py
│   ├── two-sum.py
│   ├── group-anagrams.py
│   ├── top-k-frequent-elements.py
│   └── product-of-array-except-self.py
├── Two Pointers/
│   ├── valid-palindrome.py
│   ├── two-sum-ii-input-array-is-sorted.py
│   ├── three-sum.py
│   ├── container-with-most-water.py
│   └── remove-nth-node-from-end-of-list.py
├── Stack/
│   ├── valid-parentheses.py
│   ├── min-stack.py
│   ├── evaluate-reverse-polish-notation.py
│   ├── generate-parentheses.py
│   └── daily-temperatures.py
├── Sliding Window/
│   ├── best-time-to-buy-and-sell-stock.py
│   ├── longest-substring-without-repeating-characters.py
│   ├── permutation-in-string.py
│   ├── minimum-window-substring.py
│   └── sliding-window-maximum.py
├── Binary Search/
│   ├── binary-search.py
│   ├── search-in-rotated-sorted-array.py
│   ├── find-minimum-in-rotated-sorted-array.py
│   ├── search-a-2d-matrix.py
│   └── find-median-from-data-stream.py
├── Linked List/
│   ├── reverse-linked-list.py
│   ├── merge-two-sorted-lists.py
│   ├── reorder-list.py
│   ├── remove-linked-list-elements.py
│   └── linked-list-cycle.py
├── Trees/
│   ├── maximum-depth-of-binary-tree.py
│   ├── same-tree.py
│   ├── invert-binary-tree.py
│   ├── binary-tree-level-order-traversal.py
│   ├── validate-binary-search-tree.py
│   ├── lowest-common-ancestor-of-a-binary-search-tree.py
│   └── serialize-and-deserialize-binary-tree.py
├── Tries/
│   ├── implement-trie-prefix-tree.py
│   ├── word-search-ii.py
│   └── design-add-and-search-words-data-structure.py
├── Backtracking/
│   ├── subsets.py
│   ├── combination-sum.py
│   ├── permutations.py
│   ├── word-search.py
│   └── palindrome-partitioning.py
├── Heap & Priority Queue/
│   ├── kth-largest-element-in-a-stream.py
│   ├── task-scheduler.py
│   ├── find-median-from-data-stream.py
│   └── merge-k-sorted-lists.py
├── Graphs/
│   ├── number-of-islands.py
│   ├── clone-graph.py
│   ├── course-schedule.py
│   ├── pacific-atlantic-water-flow.py
│   ├── number-of-connected-components-in-an-undirected-graph.py
│   └── graph-valid-tree.py
├── Intervals/
│   ├── insert-interval.py
│   ├── merge-intervals.py
│   ├── non-overlapping-intervals.py
│   └── meeting-rooms-ii.py
├── Greedy/
│   ├── jump-game.py
│   ├── maximum-subarray.py
│   ├── gas-station.py
│   └── candy.py
├── 1D Dynamic Programming/
│   ├── climb-stairs.py
│   ├── house-robber.py
│   ├── coin-change.py
│   ├── longest-increasing-subsequence.py
│   └── word-break.py
├── 2D Dynamic Programming/
│   ├── unique-paths.py
│   ├── longest-common-subsequence.py
│   ├── edit-distance.py
│   ├── maximal-square.py
│   └── dungeon-game.py
├── Bit Manipulation/
│   ├── single-number.py
│   ├── number-of-1-bits.py
│   ├── reverse-bits.py
│   ├── missing-number.py
│   └── sum-of-two-integers.py
├── Math & Geometry/
│   ├── rotate-image.py
│   ├── spiral-matrix.py
│   ├── set-matrix-zeroes.py
│   └── powx-n.py

Problem-Solving Approach

For each problem in this repository, you'll find:

  • Problem Description: A brief summary or link to the problem statement.
  • Solution: The Python code that solves the problem, with an emphasis on clarity and efficiency.
  • Time & Space Complexity: An analysis of the time and space complexity for each solution.

Contributing

Contributions are welcome! If you'd like to improve a solution, add more explanations, or even introduce more test cases, feel free to open a pull request. Ensure your code follows the structure and clarity standards of the repository.

About

neetcode-dsa-roadmap contains solutions to the most essential Data Structures and Algorithms problems curated by the NeetCode platform. The solutions are implemented in Python and organized based on the structured NeetCode roadmap, covering key topics like arrays, trees, dynamic programming, and graphs.

Topics

Resources

Stars

Watchers

Forks

Languages