Skip to content

Latest commit

 

History

377 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 The Algorithm Forge

My personal journey through 700+ competitive programming problems.

Python Codeforces LeetCode HackerRank


👋 Hey, I'm Hosama.

This repository isn't just a code dump—it's a diary of late nights, broken logic, "Time Limit Exceeded" errors, and the massive relief of finally seeing Accepted in bright green text.

I built this repo to track my progress as a backend engineer and a trainee at Africa to Silicon Valley (A2SV). Over the last year, I've ground through over 700 algorithms. This repository holds the exact solutions, notes, and optimizations that got me an Honorable Mention at the ETCPC 2025 programming contest.

If you're studying for interviews, learning Data Structures and Algorithms, or just curious about how to solve that one annoying dynamic programming problem—you're in the right place. Grab a coffee and look around. ☕


📦 What's Inside This Repo?

This repository contains my personal, optimized solutions for algorithmic problems across multiple platforms. Almost all solutions are written in Python, with occasional C++ for performance-critical contest submissions.

Here is exactly what you will find:

1. 🎓 A2SV Curriculum Solutions

As part of the rigorous A2SV training program, we cover advanced data structures. You'll find my daily solutions and camp problems covering everything from Two Pointers to Segment Trees.

2. ⚔️ Codeforces Contests (400+ Problems)

I regularly compete on Codeforces. Inside, you'll find solutions to Div. 2, Div. 3, and Div. 4 contests. I focus heavily on writing clean, readable Python code even under time pressure.

3. 🧩 LeetCode & HackerRank

My interview preparation grind. These are categorized by difficulty and topic. If you see a file named Hackerrank/Python: Division.py, it's from my foundational days mastering language quirks!


🗺️ How to Navigate

I'm currently in the process of organizing 700+ files, but solutions generally fall into these core domains:

🌳 Graphs & Trees: The bread and butter of interviews. Includes DFS, BFS, Dijkstra, and Union Find.

⏱️ Dynamic Programming: Overcoming the fear of 2D arrays. Includes Knapsack, LIS, and Memoization patterns.

🔍 Sliding Window & Pointers: Optimized $O(N)$ solutions for array manipulation.

🔢 Math & Geometry: Combinatorics, Number Theory, and algorithmic math tricks.


💡 Why open source my struggle?

When I first started competitive programming, looking at top-tier C++ macros from Grandmasters was intimidating. I wanted to create a repository where the code is readable, heavily commented, and written by someone who had to learn it the hard way.

Feel free to fork this, use the solutions to study, or reach out to me if you find a bug in my logic!


"First, solve the problem. Then, write the code." — John Johnson


Connect with me on LinkedInView my Portfolio

About

700+ algorithmic problem solutions from Codeforces, LeetCode, and A2SV -- organized by topic. Python and C++. ETCPC 2025 Honorable Mention.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages