When you hear a problem beginning with the following statements, it’s often (though not always) a good candidate for recursion: “Design an algorithm to compute the nth .. :;”Write code to list the first n .. :; “Implement a method to compute all..:; and so on. (Crack the coding interview Vers 6 pp.130)