01-08-2021, 05:22 AM
(01-08-2021, 04:08 AM)celerius Wrote:(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.
Thank you.
It's curious that grader referred you to an external site, and not to the course material (https://study.com/academy/lesson/practic...trees.html).
In progress: TESU - BACS [116/122]
Completed: Pierpont C&TC - Associate of Applied Science - BOG - Information Systems (May 2023)
Dummy: ASU - Certificate in Applied Business Data Analytics (January 2023)
Credits: ASU [72] | ALEKS [6] | CSMLearn [3] | InstantCert [3] | Sophia [57] | The Institutes [3] | SDC [30] | Coursera [18]
Completed: Pierpont C&TC - Associate of Applied Science - BOG - Information Systems (May 2023)
Dummy: ASU - Certificate in Applied Business Data Analytics (January 2023)
Credits: ASU [72] | ALEKS [6] | CSMLearn [3] | InstantCert [3] | Sophia [57] | The Institutes [3] | SDC [30] | Coursera [18]


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