https://ide.codingblocks.com/s/52296
no of words formed are not coming correct
Recursion keypad codes1234
Hi AASTHA, your approach is not correct for the question. There is no need of 2 functions. This question can be easily tackled by simple recursion/backtracking.
Kindly try the question again with another simple approach