Dell Technologies Interview Question

Tower of hanoi problem