Why I am getting the same output two times here ?
Sum it up backtracking
@abhishekjohri98,
Here is the corrected code https://ide.codingblocks.com/s/170005. I didn’t understand the use of boolean array. Also, my approach will give you a lexicographical answer as required. Your solution was doubling up on recursive calls.