Ad
  • Custom User Avatar

    No, it's not about finding the largest permutation. It's about finding the next one which is larger than the current.

  • Custom User Avatar

    I thougthI understood the question , but the test don't seem to be clear , If we are supposed to rearange all the number and compare if the input is greater than all the possible permitation, please explain me this
    12 ==> 21 = > Ok
    513 ==> 531 => OK
    2017 ==> 2071 => shouldn't 7210 ??