alleviationz

layout: page title: “Alec’s ePortfolio” permalink: https://alleviationz.github.io/DS&A.md

Data Structures & Algorithms

Narrative:

For this enhancement, I chose my Project 2 artifact from the Data Structures and Algorithms CS 300 class. It was initially created in October or September of 2024. This project was a simple demonstration of a binary search tree that parsed a file containing college courses as data and saved them into a Course structure. The nodes within the binary search tree used the courses as their data, and simple binary search tree functions like traversal prints, inserts, and searches were made.

While this project was relatively complete, the initial implementation did not implement the search function correctly. I had made this during a time when my programming skills were much less developed, and I saw many improvements that could be made. On top of this, I also chose this project to display my understanding of data structures in general due to the requirement. I displayed my abilities with algorithms and data structures by writing additional functions that traverse the binary search tree after rewriting it as a template function with smart pointers. I implemented a couple of basic functions to calculate the time of traversal and the space used by the class and its members to prepare for a visualization that compares other data structures. The binary search tree file was separated into a header, and a testing project file was included in the solution.

Purpose:

The purpose of this enhancement was to show how a project can be made more flexible to incorporate DRY standards and, track memory and time directly to indicate efficiency. O(n) complexity assumes correct implementation and building a direct calculation can be more indicative of more complex functions.

Binary Search Tree Class

This class is made into a template function to take any data type to create a more DRY approach. The code implementations were made into pointers to reduce memory usage, but were not fully implemented yet. Significant changes to memory could be made by reducing the size of the individual data objects as well.

Binary search tree class

Binary Search Tree Visualization

Binary search tree visualization

Vector Merge Sorting Visualization

Vector merge sorting visualization

Simple Menu with validated options and a manager object

Simple menu with validated options and a manager object

Some unit tests

unit tests

Full project repo:

Full Project