Hash Tables: Ice Cream Parlor

  • + 6 comments

    HOLD ON. I just reviewed the YouTube video from Gayle McDowell on this; and the reason why this is actually a Binary Search problem rather than a HashMap problem is this: For the case where you have two different ice cream flavors with the same cost. You need to be able to distinguish between them; and a HashMap from Cost to Flavor overwrites with the latest Flavor value for the same Cost Key. I worked through the coding solution to this with hints from that video here: https://www.youtube.com/watch?v=Ifwf3DBN1sc