Programming Challenge: #1?
This first of the series of programming difficulties:
There exists a treasure in one of N rooms.The actual rooms usually are numbered 0 to N-1.In each room there exists a slip, in which there exists a room quantity, or any treasure (signalled simply by -1).If inside the slip you find a place number, you will be to verify that room for that treasure.Eventually this method will lead you to a treasure (assume there is no closed & boundless circuit).
Write a way that will require in a selection of length N, each connected with its solar cells representing the telephone number in of which room’s slide, and a good integer between 0 along with N-1 symbolizing the starting off search spot.The system will return the room where that treasure that’s directed to in the initial location is discovered.(there is more than 1 treasure inside the array)
Are you sure this is simply not simply some sort of homework assignment that you simply be undertaking yourself
Could you reveal what language to use.
Leave a Reply
You must be logged in to post a comment.