- Created Github for version control.
- Wrote BinaryNode class with getter and setter methods.
- Not sure if generics are defined correctly yet.
- Wrote skeleton for BinarySearchTreeTester
- Wrote skeleton for BinarySearchTree
~Time spent: 30min
- testInsert() method base cases written.
- testSearch() method base cases written.
- testDelete() method base cases written.
- Changed from having a seperate class for the BinaryNode to an internal private class.
Time Spent: ~ 40min, 10%
- Wrote the insert method using an iteration traversal.
- Wrote preorderPrint() helper method for use in the testing classes.
- Recursively traverses and appends to a StringBuilder.
- Wrote search() method using an iteration traversal. Tried to do recursive traversal but realized I was making it more complicated than it needed to be.
Time Spent: ~50 min, 50%
- Wrote delete() method
- This took a while to finish, I got stuck once the code got complicated to follow, so I went back to add comments where needed.
- wrote inorderRec() method
- This was a pretty simple recursive method.
Time Spent: ~1hr 20 min, 90%
- Wrote the rest of the test methods for the BinarySearchTree class.
- Wrote kthSmallest() method.
- Did not 100% finish this method, but it's super close! I had issues with out of bounds indexes.
Time Spent: ~30 min, 100% Done (kinda)
- Found a typo in the kthSmallest() method that was referencing the object's root instead of the parameter root that was passed in.
- Everything works now!
Time Spent: 10 min, 100% Done (actually)
- Fixed some minor bugs in search() method and demonstration.
- Started the AVLTree class skeleton.
- Went back and cleaned up and commented on all classes.