Algorithm and Data Structures

Algorithm and Data Structures Narrative

Describe the Artifact

The artifact I chose to demonstrate my abilities with algorithms and data structures is the binary search tree program I created in my CS-260 course in October 2021. It is a program that presents a menu for the user to load auction bids from a CSV file, print them to the screen, allow the user to also search for a specific bid by its id, and remove a specific bid from the data set.

Justify the Inclusion

The reason I chose this artifact for my ePortfolio was that it best demonstrated my ability to work with C++ and sorting algorithms for sorting through large data sets quickly. I also saw several enhancements I could make to improve the code which would further demonstrate my understanding of algorithms and data structures and my ability to work with them. I made several improvements to the program the biggest being that I added functionality and expanded the binary search to include the ability to search by a given price range along with by a bid id. I removed the hard-coded bid id that only used a specific id to return results for all of the functionality and instead enhanced the code by allowing the user to provide input to allow user-defined requests from the program such as search by bid id, find bid by amount, and remove a bid. I also added a check to make sure that the user choice is a valid input and if not print an error message and prompt the user to try another choice. I added a deconstructor to recursively delete every node in the binary search tree to prevent memory leaks. I also added more thorough comments to better explain what the code is doing for both myself and any future programmers who use the code. I also cleaned up unnecessary comments such as fixme comments and old code that had been commented out.

Reflect on the Process

What I learned by creating and improving the program were both the difficulties and how important it is for someone to be able to load, sort, display, and find data from large data sets quickly. In doing so I also learned about the security concerns of using C++ over other languages and how to look for these issues and resolve them in the future. Some of the challenges I face in the enhancement of this program were things like dealing with pointers and the extensive attention to detail needed to work with them. I also had to work through the code logically to resolve a bug as when getting close to being finished I had a program that would display the menu but did not do any of the other functions needed to run the program due to an error in one of the key methods that was not a typical bug that would cause the ide to throw errors and thus pointing you in the direction of the problem. I had to work out what part of the code was causing the issue and resolve it based on what part of the code was most likely to cause the issue. Once I worked that out I was able to run the program and all its functionality properly.

Address

18215 Foothill Blvd
Fontana, CA 92335
United States of America