2 votes 2 votes #IITD_2011 A man is standing in front of an infinite wall with a hole on any side? How do u find the hole in shortest distance Rajesh Pradhan asked Feb 22, 2016 Rajesh Pradhan 479 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes A POSSIBLE SOLUTION - Go left and then right of a starting point and increase the distance exponentially i.e. 1km left then 1 km right ..next time increase distance 2 km left and then 2km right. Ankit Naik 1 answered Feb 23, 2016 Ankit Naik 1 comment Share Follow See all 2 Comments See all 2 2 Comments reply Arjun commented Feb 23, 2016 reply Follow Share So, what will be the time complexity? 0 votes 0 votes MaheshK commented Feb 23, 2016 reply Follow Share If 'n' denotes the shortest distance ,time complexity will be O(2n). PS:A KM movement is taken as a unit of operation. 0 votes 0 votes Please log in or register to add a comment.