1.

Minimum time required to solve tower of hanoi puzzle with 4 disks assuming one move takes 2 seconds, will be __________(a) 15 seconds(b) 30 seconds(c) 16 seconds(d) 32 secondsThe question was asked by my college professor while I was bunking the class.Asked question is from Recursion in portion Recursion of Data Structures & Algorithms II

Answer» RIGHT answer is (B) 30 SECONDS

Easiest explanation - Number of moves = 2^4-1=16-1=15

Time for 1 MOVE = 2 seconds

Time for 15 moves = 15×2 = 30 seconds.


Discussion

No Comment Found

Related InterviewSolutions