$ show MAZHARMIK/Interview_DS_Algo
This repository is a comprehensive collection of C++ solutions to LeetCode and competitive programming problems, organized by data structure and algorithm topic (e.g., Arrays, DP, Graph, Tree, Sliding Window, etc.). It serves as a study resource for interview preparation and algorithm practice. The codebase consists of standalone solution files, each solving a specific problem, with no shared library or build system. While the solutions are functional and cover a wide range of topics, they are tightly coupled to individual problem statements and lack modularity or test coverage, limiting reusability as independent components. The repository is actively maintained with frequent additions of new solutions.
The LLM identified 4 files worth highlighting for reuse:
Implements a generic segment tree for range sum queries with point updates. The code is self-contained and can be extracted as a reusable segment tree class for any problem requiring dynamic range sum queries.
Provides a complete implementation of Union-Find with union by rank and path compression. This is a classic, reusable data structure for connectivity problems, written in a clean, self-contained manner.
A standard Trie implementation supporting insert, search, and startsWith operations. The code is isolated and can be reused in any project requiring prefix-based string lookups.
Implements matrix exponentiation for fast computation of linear recurrences. The code is generic (template-based) and can be adapted to different matrix sizes and recurrence relations, making it a reusable algorithmic building block.