• + 1 comment

    @shraiysh Can you explain the logic here. The lexicographical permutation solution didnt work for me. It is giving me runtime error. But your code is working for me. I dont understand why.