Mastering Memory, Pointers, and Algorithmic Efficiency in Pure C.
This repository is a curated collection of C programs designed to master low-level programming. From basic syntax to manual memory management, every file represents a step toward becoming a proficient C developer.
- Zero to Hero: Moving from simple
printfstatements to complex pointer arithmetic. - Manual Control: Mastering
malloc,free, and the heap. - Efficiency: Optimizing LeetCode solutions for speed and minimal memory footprint.
- Structured Learning: A clean, organized reference for interview prep.
This diagram shows how the project is organized. It updates automatically as I add more modules.
graph TD
Root((C-Programming-Programs)) --> DS[Data Structures]
Root --> LC[Leet Code]
Root --> MP[Mini Programs]
Root --> PR[Practice]
Root --> SEM[SEM II / UNIT I]
DS --> LL[Linked Lists]
DS --> ST[Stacks/Queues]
LC --> AR[Array Problems]
LC --> ST2[String Manipulation]
style Root fill:#f96,stroke:#333,stroke-width:4px
style DS fill:#1f6feb,color:#fff
style LC fill:#238636,color:#fff
I focus on building these from the ground up without external libraries to understand exactly how memory behaves.
- Variations: Singly, Doubly, and Circular.
- Logic: Dynamic node allocation and pointer-based traversal.
- LIFO/FIFO: Mastering data flow logic.
- Storage: Comparative implementations using both Arrays and Linked Lists.
- Memory Safety: Constant focus on preventing memory leaks.
-
Complexity Analysis: Every algorithm is considered for its
$O(n)$ performance. - Pointers: Deep dives into double pointers, function pointers, and arrays.
The primary goals of this repository are to:
- Strengthen core C programming fundamentals.
- Build robust problem-solving skills through algorithmic challenges.
- Practice implementing data structures from scratch (manual memory management).
- Maintain a structured reference for technical interviews and revision.
| Folder | Description |
|---|---|
Data Structures/ |
Implementations of core data structures from scratch. |
Practice/ |
Basic programs, syntax exercises, and concept practice. |
LeetCode/ |
Solutions to LeetCode problems implemented in C. |
Mini Programs/ |
Small standalone utilities, logic puzzles, and simulations. |
This folder focuses on manual implementation using pointers and dynamic memory allocation (malloc, free).
- Operations: Creation, Traversal, Searching.
- Insertion: Front, Rear, and Position-based.
- Deletion: Removing nodes by value or position.
- Stack: Array and Linked List implementations (Push, Pop, Peek).
- Queue: Basic FIFO operations, Circular Queues, and Linked Queues.
- Binary Search Tree (BST) operations.
- In-order, Pre-order, and Post-order Traversals.
Focuses on solving competitive programming problems with an emphasis on:
- Logic building and algorithmic efficiency.
- Time & Space Complexity optimization (O(n), O(\log n)).
- Pointer Mastery: Handling arrays and strings efficiently.
- Edge Case Handling: Managing NULL pointers and buffer overflows.
To compile any C program, you need a C compiler such as GCC installed.
gcc filename.c -o outputname./outputnamegcc linked_list.c -o linked_list
./linked_list
I plan to add:
- Documentation and example input/output for each program
- Makefile support for easier compilation
- Unit tests for key modules