Skip to content

Latest commit

 

History

History
109 lines (71 loc) · 4.48 KB

File metadata and controls

109 lines (71 loc) · 4.48 KB
Typing SVG

About this repository

  • Purpose: A hands-on, well-organized collection of Data Structures & Algorithms implementations in Python. Designed for reading, running, experimenting, and interview preparation.
  • Audience: Students, interview candidates, competitive programmers, and developers wanting clear algorithm references.
  • Approach: Human-readable code, problem-numbered filenames, technique-focused folders, and short notes on complexity where useful.

Why use this repo?

  • Learn by doing: Each file is a runnable Python script you can modify and test.
  • Pattern first: Files are grouped by algorithmic pattern (recursion, graph, sliding-window, etc.) so you can study techniques across problems.
  • Fast reference: Use it as a quick lookup for canonical solutions and common optimizations.

Repository structure (summary)

  • Ad Recursion/ — recursion & backtracking solutions (permutations, combinations, N-Queens, generate-parentheses, etc.)
  • Binary Tree/ — binary tree implementations and traversal examples
  • graphs/ — graph algorithms (BFS/DFS, Dijkstra, Bellman-Ford, shortest paths)
  • Heaps/ — heap operations and heap-based problems
  • LInked_list/ — singly/doubly linked list examples and utilities
  • sliding_window/, prefix_sum/ — technique-centered problem sets
  • leetcode_contest/ — contest-style, time-limited practice problems
  • Other folders: Bit-manipulation/, HashMap/, Stack and queue/, BST/

Filenames follow this convention: <problem-number>. <short-title>.py or descriptive names for practice scripts.


Quick start

  1. Ensure Python 3.8+ is installed.
  2. From the repository root, run a solution directly. Examples:
python "graphs/dijkstra_Algo/1334. Find the City With the Smallest Number of Neighbors at a Threshold Distance.py"
python "Ad Recursion/39. Combination Sum.py"
  1. To experiment: open a file, change the sample input or add an if __name__ == '__main__': block, then re-run.

  2. Use your editor's search to find problems by number, technique, or title.


Recommended learning path

  1. Basics & utilities: Bit-manipulation/, Stack and queue/, LInked_list/
  2. Two pointers / sliding window / prefix sums
  3. Recursion & backtracking: Ad Recursion/
  4. Trees & graphs: Binary Tree/, graphs/
  5. Heaps, maps, advanced data structures, and contest practice

Practice tip: pick one topic per day, implement a solution without looking, then compare with the repo's implementation.


Coding conventions

  • Use descriptive names and small helper functions.
  • Add a short complexity note when you refactor or optimize: # Time: O(...) Space: O(...).
  • Keep functions pure where practical; place I/O under if __name__ == "__main__":.
  • When adding new solutions, follow filename pattern: NNN. Problem Title.py and include examples.

How to contribute

  • Fork → branch → PR. Keep PRs focused (one problem or small refactor per PR).
  • Required in PR: problem description (brief), input/output example(s), complexity note, and tests/edge-cases if applicable.
  • Add new problems to the appropriate folder. If unsure, open an issue to discuss organization.

Interview practice workflow

  • Choose a problem, set a 45–60 minute timer.
  • Read and plan on paper first; then implement in Python.
  • Run edge cases and add assertions.
  • After solving, write a short README note inside the file explaining approach and complexity.

Useful references

  • CLRS — Introduction to Algorithms
  • LeetCode / GeeksforGeeks problem pages
  • Python docs for language idioms and data structures

Contact & acknowledgements

If you'd like to contribute, propose improvements, or ask questions, open an issue or submit a PR. Thank you for using this collection — happy learning and good luck with interviews!


Generated and organized for clarity. Want a CONTRIBUTING.md or an automated test harness added next?