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.
I thought about using PriorityQueue, but I'm not sure what to store in it. Would I store custom objects that have two attributes (customer id and time+duration) and then implement a custom Comparator that makes sure that the objects are sorted by time+duration?
It seems like a lot of work...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Orders
You are viewing a single comment's thread. Return to all comments →
I thought about using PriorityQueue, but I'm not sure what to store in it. Would I store custom objects that have two attributes (customer id and time+duration) and then implement a custom Comparator that makes sure that the objects are sorted by time+duration?
It seems like a lot of work...