We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This is one of the worst questions I've attempted on this website. As mentioned below, there are a number of different approaches (other than the suggested Binary Search) to find the correct costs, but the problem is ruined by its overly complicated output expectations. Why do the indexes start with 1? Why are we returning indexes and not the prices themselves? Why does the order of the indexes matter? Needlessly complicated, nothing in the real world works this way.
Hash Tables: Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
This is one of the worst questions I've attempted on this website. As mentioned below, there are a number of different approaches (other than the suggested Binary Search) to find the correct costs, but the problem is ruined by its overly complicated output expectations. Why do the indexes start with 1? Why are we returning indexes and not the prices themselves? Why does the order of the indexes matter? Needlessly complicated, nothing in the real world works this way.