01-08-2021, 04:08 AM
(01-08-2021, 03:32 AM)doom Wrote: 1) regarding upper/lowercase, why not just use toLowerCase() on both sides when comparing strings?
2) did you implement the BST as an inner class?
1) I just wanted to minimize the number of case changing for comparison. Instead of 2 toLowerCase(), I just need to do 1. It just doesn't look as pretty when the data structure is printed because it's "new york" instead of "New York" but otherwise it functions just fine.
2) I didn't because the TreeMap is already a Red-Black tree which is a kind of BST. But the feedback grader mention that I can expand on my program to perform a BST search and referred me to an external site with some information on BST. So it would seem I kinda scraped by.


![[-]](https://www.degreeforum.net/mybb/images/collapse.png)