Skip to content

A comprehensive repository to explore Python fundamentals, implement data structures, and learn algorithms. Includes problem solutions from platforms like LeetCode and Codeforces. Perfect for beginners and those preparing for coding interviews!

License

Notifications You must be signed in to change notification settings

SuyashEkhande/python-algos-and-data-structures

Repository files navigation

Python Data Structures and Algorithms

This repository provides Python implementations of various data structures, algorithms, design patterns, and solutions to popular coding problems. It aims to build a strong foundation in Python programming, improve problem-solving skills, and explore optimization techniques for real-world and competitive programming challenges on platforms like LeetCode, Codeforces, and HackerRank.

Repository Structure

The repository is organized into the following folders:

1. fundamentals

This folder contains basic Python concepts and fundamental programming techniques to build a strong foundation.

  • Built-in functions and modules
  • Closures, nested functions, and decorators
  • Context managers and file handling
  • Python data structures, comprehensions, and string operations
  • Functions, control flow, and operators
  • Module imports and custom modules

2. object_oriented_programming

This folder focuses on object-oriented programming concepts and patterns.

  • Classes, objects, and inheritance
  • Encapsulation and polymorphism
  • Static and class methods
  • Dunder (magic) methods

3. algorithms

This folder includes implementations of essential algorithms, covering:

  • Sorting (Quick Sort, Merge Sort, etc.)
  • Searching (Binary Search, Linear Search)
  • Divide and Conquer
  • Greedy Algorithms
  • Dynamic Programming
  • Backtracking
  • Graph Algorithms (BFS, DFS)

4. dsa

This folder includes implementations of core data structures and algorithms for DSA practice.

  • Arrays
  • Linked Lists
  • Stacks
  • Queues
  • Hash Tables
  • Trees
  • Graphs

5. design_patterns

This folder organizes design patterns into three categories:

Creational Patterns

  • Abstract Factory, Builder, Factory, Prototype, Singleton

Structural Patterns

  • Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy

Behavioral Patterns

  • Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template, Visitor

6. concurrency_parallelism

This folder demonstrates concurrency and parallelism concepts in Python.

  • Asynchronous Programming (asyncio)
  • Threading (py_threading.py)
  • Multiprocessing (multi_processing.py)
  • Using concurrent.futures for thread and process pools
  • Green threads with gevent

7. memory_management

This folder explores memory management and optimization techniques in Python.

  • Garbage collection
  • Heap and stack memory differentiation
  • Memory usage optimization
  • Weak references

8. problems

This folder contains solutions to coding problems from platforms such as LeetCode, Codeforces, and HackerRank.

9. testing_debugging

This folder focuses on testing and debugging techniques in Python.

Debugging

  • Examples using Python's pdb debugger

Profiling and Optimization

  • Code profiling with cProfile
  • Optimization using functools.lru_cache
  • Benchmarking with timeit

Unit Testing

  • Example unit tests for mathematical operations

Contact

Feel free to reach out if you have any questions or suggestions:

Email
GitHub

About

A comprehensive repository to explore Python fundamentals, implement data structures, and learn algorithms. Includes problem solutions from platforms like LeetCode and Codeforces. Perfect for beginners and those preparing for coding interviews!

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages