Overview
In this systems development project, I built a full suite of classic data structures and algorithms from scratch in C++ using CLion — deliberately avoiding STL containers for the core exercises. Every implementation ships with a hand-rolled Node class, a destructor that reclaims memory node by node, and Big-O analysis integrated directly into the execution output. Below, each topic pairs the algorithm with an interactive sandbox you can run in your browser.
1. Fibonacci Sequence
Project Context: Built as an initial algorithmic warm-up to practice vector logic, basic loop structures, and tracking cumulative metrics (sum, max, and average) while mapping out algorithmic complexity.
// running it
$ g++ main.cpp -o fib && ./fibbrowser sandboxSequence: 0 1 1 2 3 5 8 13 21 34 55 89 144
Count: 13
Max: 144
Average: 28.92$ python main.pyreal Python · PyodideSequence: 0 1 1 2 3 5 8 13 21 34 55 89 144
Count: 13
Max: 144
Average: 28.92Sequence: 0 1 1 2 3 5 8 13 21 34 55 89 144 | Count: 13 | Max: 144 | Average: 28.92
2. Linked Lists
Project Context: Moving beyond contiguous memory arrays, this module builds a singly linked list from scratch using a custom Node struct — completely avoiding std::list. It supports front and back insertions, precise node-after lookups, and manual memory teardown.
// running it
$ g++ main.cpp -o list && ./listbrowser sandbox5 -> 10 -> 20 -> 15 -> NULL$ python main.pyreal Python · Pyodide5 -> 10 -> 20 -> 15 -> NULL5 -> 10 -> 20 -> 15 -> NULL
Applied Project Component: Console Line Editor
This linked list data structure was scaled up into a fully functioning command-line text editor. EDIT loads a document into memory, :I inserts a line before a designated index, :D deletes lines or ranges, :L prints the file buffer, and :E saves and exits — turning raw pointer manipulation into a true productivity tool.
Assignment 1: Line Editor
// running it
$ g++ main.cpp -o editor && ./editorbrowser sandbox> :L
1: Hello world
2: The quick brown fox
3: Goodbye moon
> :I 2 "Inserted between"
> :L
1: Hello world
2: Inserted between
3: The quick brown fox
4: Goodbye moon
> :D 1
> :L
1: Inserted between
2: The quick brown fox
3: Goodbye moon
> :E
Saved 3 lines to editor.txt$ python main.pyreal Python · Pyodide> :L
1: Hello world
2: The quick brown fox
3: Goodbye moon
> :I 2 "Inserted between"
> :L
1: Hello world
2: Inserted between
3: The quick brown fox
4: Goodbye moon
> :D 1
> :L
1: Inserted between
2: The quick brown fox
3: Goodbye moon
> :E
Saved 3 lines to editor.txt3. Stacks & Queues
Project Context: Re-utilizing the foundational Node structure to construct linear abstract data types enforcing strict access rules: Last-In-First-Out (LIFO) for stacks and First-In-First-Out (FIFO) for queues, the latter with an efficient tail pointer.
Stack — LIFO
// running it
$ g++ main.cpp -o stack && ./stackbrowser sandbox3 2 1$ python main.pyreal Python · Pyodide3 2 13 2 1
Queue — FIFO
// running it
$ g++ main.cpp -o queue && ./queuebrowser sandbox1 2 3$ python main.pyreal Python · Pyodide1 2 31 2 3
Applied Project Component: ASCII Maze Solver
Leveraged the stack and queue containers to ingest a 25×25 grid maze text file ( |, -, + walls ), navigate coordinate pathways from the top-left start to the bottom-right exit, and write the solved path back to disk marked with #.
Assignment 2: Maze Solver
// running it
$ g++ main.cpp -o maze && ./mazebrowser sandboxSolved maze (# marks the path):
# +
# +
####
+++#
###$ python main.pyreal Python · PyodideSolved maze (# marks the path):
# +
# +
####
+++#
###4. Searching & Trees
Project Context: Transitioning from flat linear collections to hierarchical ordered structures, implementing recursive binary search, unbalanced binary search trees, and self-balancing AVL trees to maintain logarithmic lookup efficiency.
Recursive Binary Search
// running it
$ g++ main.cpp -o bsearch && ./bsearchbrowser sandbox7 -> 3
4 -> -1$ python main.pyreal Python · Pyodide7 -> 3
4 -> -17 -> 3 | 4 -> -1
Binary Search Tree (BST)
// running it
$ g++ main.cpp -o bst && ./bstbrowser sandbox1 3 4 5 7 8$ python main.pyreal Python · Pyodide1 3 4 5 7 81 3 4 5 7 8
Self-balancing Tree (AVL)
// running it
$ g++ avl.cpp main.cpp -o avl && ./avlbrowser sandboxBuilding AVL from: 10 20 30 40 50
root: 20
height: 3
inorder: 10 20 30 40 50
balanced: yes
Deleting 20...
root: 30
height: 3
inorder: 10 30 40 50
balanced: yes$ python main.pyreal Python · PyodideBuilding AVL from: 10 20 30 40 50
root: 20
height: 3
inorder: 10 20 30 40 50
balanced: yes
Deleting 20...
root: 30
height: 3
inorder: 10 30 40 50
balanced: yesBuild 10 20 30 40 50 → root 20, height 3, inorder 10 20 30 40 50 | Delete 20 → root 30, inorder 10 30 40 50
Applied Project Component: Spell Checker
Ingests an external document, maps a dictionary into a self-balancing BST structure, scans text word by word against the tree nodes, flags spelling errors to the console, and outputs structural balance reports to disk.
Assignment 3: Spell Checker
// running it
$ g++ main.cpp -o spell && ./spellbrowser sandboxBuilding dictionary tree...
Dictionary words: 35
Document words: 28
Misspelled words:
checkr
thre$ python main.pyreal Python · PyodideBuilding dictionary tree...
Dictionary words: 35
Document words: 28
Misspelled words:
checkr
thre5. Hash Tables
Project Context: Implements a hash table using separate chaining where each bucket manages a linked list. Features a custom hashing function, O(1) head/tail inserts, and explicit bucket collision reporting.
// running it
$ g++ main.cpp -o hashtable && ./hashtablebrowser sandbox0: otter dog
1: bat
2: cat
3: tiger raccoon
Contains 'tiger': yes$ python main.pyreal Python · Pyodide0: otter dog
1: bat
2: cat
3: tiger raccoon
Contains 'tiger': yes0: otter dog1: bat2: cat3: tiger raccoonContains 'tiger': yes
6. Sorting
Project Context: Concluding the algorithmic evaluation by executing sorting routines across large random vectors while systematically counting comparison and swap operations to quantify performance differences.
Bubble Sort
// running it
$ g++ main.cpp -o sort && ./sortbrowser sandbox1 3 5 8 | swaps: 5$ python main.pyreal Python · Pyodide1 3 5 8 | swaps: 51 3 5 8 | swaps: 5
Applied Project Component: Command-Line Employee Sorter
Loads a tab-separated corporate dataset into a custom object model, overloads comparison operators to drive advanced merge sort logic, and sorts rows dynamically based on terminal arguments — ID, last name, hourly rate, and more.
Assignment 4: Employee Sorter
// running it
$ g++ main.cpp -o sort && ./sortbrowser sandboxMerge sort by field #2 (last name), ascending:
W1232675, Herrera, Alexis, Yucca Valley, factory, 81.63
W8500260, Ho, Gael, Coshocton, factory, 57.04
W0679037, Murphy, Deegan, Brenham, sales, 54.42
W4372961, Pratt, Amir, Montclair, office, 12.34$ python main.pyreal Python · PyodideMerge sort by field #2 (last name), ascending:
W1232675, Herrera, Alexis, Yucca Valley, factory, 81.63
W8500260, Ho, Gael, Coshocton, factory, 57.04
W0679037, Murphy, Deegan, Brenham, sales, 54.42
W4372961, Pratt, Amir, Montclair, office, 12.34Engineering Takeaways
- Building from scratch — hand-rolling each structure clarifies the physical memory trade-offs, such as why a tail pointer grants O(1) appends and why self-balancing prevents tree degeneration.
- Memory discipline — custom destructors that walk and deallocate every node drill down robust, leak-free resource management in C++.
- Algorithmic profiling — embedding Big-O metrics and operation counters directly into test outputs turns abstract complexity analysis into concrete, measurable engineering feedback.
All projects were implemented in C++ using CLion.