This repository contains C++ implementations of common data structures and algorithms completed as part of the ECE 250 course at the University of Waterloo.
Implementation of a simple calculator using a linked list data structure. The program consists of two major classes - VarDataNode
and CalcLinkedList
.
VarDataNode.cpp/.hpp
: Node class to store variable valuesCalcLinkedList.cpp/.hpp
: Linked list class to store operationsmain.cpp
: Calculator program driver
Implementation of a hashed page table using separate chaining and open addressing. The page table stores Process
objects and maps virtual page numbers to physical frame numbers.
HashPageTable.cpp/.hpp
: Page table classSeparateChainedTable.cpp/.hpp
: Separate chaining implementationOpenAddressedTable.cpp/.hpp
: Open addressing implementationProcess.cpp/.hpp
: Process classmain.cpp
: Driver to test page table
Implementation of a prefix tree (trie) to store and search for words. The Trie
class contains nested Node
and Iterator
classes.
Trie.cpp/.hpp
: Trie classmain.cpp
: Driver to test trie functions
Implementation of Prim's algorithm to find minimum spanning tree of a graph. Uses a priority queue to store graph edges.
PowerGridGraph.cpp/.hpp
: Graph representationEdgesPriorityQueue.cpp/.hpp
: Priority queuemain.cpp
: Driver to test algorithm
Each project includes a Makefile to compile the code. Use make
to build and ./a.out
to run.
The LaTeX documentation provides additional details on the class structures and algorithms.
The UML diagrams were created with PlantUML and can be re-generated from the included .puml
files.
The projects were developed using test cases provided by the course staff. See the individual project readmes for details on running tests.
Chaitanya Sharma