This repository contains my practice and training solutions for algorithmic and data-structure problems from LeetCode and Codeforces.
The goal of this repository is to:
- Strengthen problem-solving skills
- Improve algorithmic thinking
- Prepare for technical interviews
- Practice writing clean, efficient, and readable code
- LeetCode
- Codeforces
- Arrays & Strings
- Hashing (Set / Dictionary)
- Sorting & Searching
- Two Pointers
- Greedy Algorithms
- Sliding Window
- Basic Math Problems
- Edge Case Handling
- Time & Space Complexity Optimization
βββ leetcode/
β βββ arrays/
β βββ strings/
β βββ greedy/
β βββ ...
β
βββ codeforces/
β βββ beginner/
β βββ math/
β βββ ...
β
βββ README.mdEach solution file typically includes:
- Problem description (brief)
- Approach explanation
- Time and space complexity
- Python implementation
- Best Time to Buy and Sell Stock
- Helpful Maths
- Boy or Girl
- String Parsing & Sorting
- Distinct Character Counting
- Python (primary)
For each problem, special attention is given to:
- Optimized solutions (O(n), O(log n) when possible)
- Comparison with brute-force approaches
- Handling edge cases correctly
This repository is meant for:
- Daily coding practice
- Interview preparation
- Revisiting core concepts
- Tracking personal progress over time
- Solutions are written for clarity first, then optimized.
- Some problems may have multiple approaches (naive vs optimal).
- Code may be refactored over time as understanding improves.
Suggestions, improvements, or alternative approaches are always welcome.
Happy coding! π»π₯