Skip to content

roham648/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 Algorithmic Thinking & Problem Solving in Python

Welcome to my personal collection of data structures and algorithms implemented from scratch in Python! This repository documents my journey of mastering core computer science concepts, optimizing code efficiency, and analyzing complexity.


πŸš€ Implemented Challenges & Solutions

Here are the specific algorithmic challenges I have solved and optimized so far:

1. πŸ›‘οΈ Server Rate Limiter (Sliding Window Algorithm)

  • The Problem: Protecting an API or server from being spammed by a single user sending too many requests.
  • The Solution: Implemented a highly optimized tracking mechanism using a Python Dictionary and a while loop with .pop(0). It tracks user timestamps within a dynamic window (e.g., 10 seconds) and automatically drops expired data to keep memory usage minimal.

2. 🎯 The Two Sum Challenge (Hash Map Optimization)

  • The Problem: Finding two numbers in an array that add up to a specific target.
  • The Optimization: Moved away from a slow Brute-Force approach ($O(N^2)$) and optimized it using a Python Dictionary (Hash Map) to achieve a lightning-fast $O(N)$ time complexity, scanning the list only once.

πŸ“Š Time & Space Complexity Focus (Big O)

Through these challenges, I am learning how to shift from slow code to efficient code:

  • Shifting from $O(N^2)$ (Brute-force) to $O(N)$ (Optimized).
  • Understanding how memory allocation changes based on the data structures used.

πŸ“š My Goals

I use this repository to practice translating algorithmic theory into clean, working Python code. I will keep adding more algorithms here as I continue studying computer science and problem-solving concepts!

Feel free to browse the solutions or drop a ⭐ if you find these challenges interesting!

About

i take every algorithm i build with my self

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages