Kindly help why this code does not produce any output for large value input like (1000,2).
I have used the modulo property as well.
Please help me debug the program.
Code File: https://ide.codingblocks.com/s/176358
No output for large permutations
@prat98
Hello Pratyush your code is not producing output for large input because u are using recursion and your solution time complexity is roughly exponential.
Hint - to reduce time complexity try dynamic programming
Thanks for the hint.I’ve
But still test cases are nit passed can you explain the error in this program https://ide.codingblocks.com/s/177020
Awesome! Thanks for the help