DEV Community

Cover image for Project Prioritize(Heap Practice)
Corey
Corey

Posted on

Project Prioritize(Heap Practice)

https://github.com/TheHamhams/Project-Heap

Hello,

I am a stay at home dad who is working to become a programmer. I am currently using Codeacademy to learn, but I am also starting to work on personal projects to practice my skills.

This project was meant to practice creating and utilizing a heap structure to prioritize personal projects. I know there is a heap library, but I wanted to implement my own as a way to understand it better. The program allows you to create a project list(house work, work projects, yard work, etc.) and add specific tasks with a prioritization level in order to sort them.

The max heap is standard save the ability to delete a project by name in addition to popping off the max. There is also a method that lets you print a sorted list of the desired project category. However, I am not very satisfied with how I accomplished it. I ended up creating a copy of the list, popping off the max values in order, adding them to another list, and then printing that list. I am sure there is a better way to accomplish this, but it was the solution I came up with.

One of my main focuses as I create my projects is to implement best practices with my code as much as possible. If anyone has any suggestions on how I can improve in this area I would love to hear it. I have a lot of practice getting feedback so I welcome hearing about areas I can improve.

Top comments (0)