Search in a maze Design
On an office floor , there are e entities - Walls , Cubicles , Coffee Rooms.
In what data structure we should store this design that when a new member joins the company , the cubicle number which is empty and next closest to any coffee room should be assigned to it.
Basically , data structure DS.pop() should return that cubicle number in the most efficient way.
A Person can walk through cubicles to reach a coffee room but not through walls.
In what data structure we should store this design that when a new member joins the company , the cubicle number which is empty and next closest to any coffee room should be assigned to it.
Basically , data structure DS.pop() should return that cubicle number in the most efficient way.
A Person can walk through cubicles to reach a coffee room but not through walls.
Read full article from Code Zone
No comments:
Post a Comment