A comprehensive repository containing custom implementations of fundamental data structures and algorithmic patterns in C and Python. This workspace is designed for building computational problem-solving foundations, studying time/space complexity tradeoffs, and practicing coding interview questions.
Strong foundations in Data Structures and Algorithms (DSA) are critical to writing high-performance, resource-efficient code. In real-world software engineering, these concepts are directly applied in:
- Operating Systems & Memory Management: Page replacement (Stacks/Queues), heap memory allocation (Heaps/Trees).
- Database Systems: Efficient search, range queries, and indexing (B-Trees, Hash Tables, Matrix operations).
- Networking: Routing algorithms, packets serialization, buffer management (Queues, Graphs).
- Data Science & ML: Multi-dimensional operations, linear transformations, and distance metrics (Matrices, Arrays).
- Primary Language: C (ANSI C/C99 standard) for low-level memory control and raw performance understanding.
- Secondary Language: Python 3.x (primarily for solving LeetCode problems quickly).
- Compiler:
gcc(GNU Compiler Collection). - Workspace Settings: Integrated
.vscodesettings for automating compilation and debugging in Visual Studio Code.
The code is categorized logically by data structure or paradigm:
-
ARRAY: General array operations.- Reversals, rotations (left/right rotation), insertions, deletions, merging sorted arrays.
- Moving zeroes to the end, identifying missing numbers, and finding the
$1^{\text{st}}, 2^{\text{nd}}, 3^{\text{rd}}$ largest elements.
-
LINKED LIST: Dynamic memory structures.- Singly and doubly linked lists (insertions, deletions, conversions from arrays, finding the middle node, removing the
$k^{\text{th}}$ element).
- Singly and doubly linked lists (insertions, deletions, conversions from arrays, finding the middle node, removing the
-
HEAP: Binary Heaps.- Max-Heap and Min-Heap implementations (insertion, get max/min, deletion of max/min, verification checks).
-
MATRIX: 2D grid computations.- Matrix addition, scalar multiplication, matrix multiplication, and transposition.
-
STACK (LIFO)&QUEUE (FIFO): Linear helper structures.- Array-based and pointer-based implementations.
-
TREE: Hierarchical data structures.- Binary Search Tree (BST) operations (insertion, deletion, search, traversals like Inorder, Preorder, Postorder).
-
SEARCH: Searching techniques.- Linear Search, Binary Search (iterative and recursive).
-
LEETCODE: Python-based solutions for coding problems (e.g., 238. Product of Array Except Self).
Make sure you have gcc installed (via MinGW-w64 on Windows, or through your package manager on macOS/Linux).
To compile a specific file (e.g., 3_array_reversal.c):
gcc ARRAY\3_array_reversal.c -o array_reversal.exeTo run the compiled executable:
- Windows:
.\array_reversal.exe - macOS/Linux:
./array_reversal
To run Python scripts (e.g., in the LEETCODE directory):
python LEETCODE\238.py