TLE for n>=13.
My solution works till n=12. Since the time complexity is n!.
Any suggestion for optimization. Please reply as soon as possible.
TLE for n>=13.
My solution works till n=12. Since the time complexity is n!.
Any suggestion for optimization. Please reply as soon as possible.