Ideal data structure for finding minimum and iterating the elements in it
Anonymous User
188

What would be the ideal datastructure set up where we need to assign the closest parking slot and list all the allocated slots when needed?

I started with heap to find the closes slot but then it is not ideal to loop through all the elements and dispaly the info.

Comments (1)