next_permutation : find next lexicographically greater permutation - Tutorial
Sheet
Blog
Discussion
Solve
Editorial
+
Note