02-01-2021, 04:56 PM
(02-01-2021, 09:06 AM)Turkish Wrote: Hoping someone here can help me out with this. I've sent questions into SDC a while ago, but so far no response.Sorry, no help here. You may have to just email and ask SDC. I just wanted to let know people are reading your response.
In Part 2 of the assignment for this course where you're storing States and their respective Capitals, there's a section that reads "Now revise the code to store the pairs of each state and its capital in a Map using the HashMap function. Display the content of the Map, then use the TreeMap class to sort the map while using a binary search tree for storage."
First sentence is easy enough, but it's the second on that's throwing me and I'm just not clear on what is being asked and maybe I'm overthinking this. The way I'm reading it is it appears to be asking for the State/Capitals to be moved from a HashMap, sorted with TreeMap, but saved into a Binary Search Tree. I'm not sure how you'd leverage TreeMap without creating an instance of it and storing inside it, but I'm not clear if it's asking for the data to go HashMap->BST or HashMap->TreeMap->BST. It's the 'sort' and 'storage' parts that are throwing me off.
I just want to confirm it's asking for moving the data into a HashMap, then stored into a TreeMap for sorting purposes, then into a Binary Search Tree for user search