I am getting TLE error, How is it possible to solve this question In less than O(n^2) time complexity?
MY code: https://ide.codingblocks.com/s/281283
Next Permutation
Please first take a look at my code first, I have used next_permutation only. Iām still getting TLE error.
u r not decrementing t.inside while loop
1 Like
Oh I got it, sorry that was a really silly mistalke.