Problem 604. Next lexicographic - permutation
Solution Stats
Problem Comments
-
2 Comments
Stefan Abendroth
on 20 Jul 2023
I think test case 6 is wrong. The lexicographic follower of 'xyzDOG' is 'xyzGDO', not 'xyzGOD'.
Dyuman Joshi
on 21 Jul 2023
@Stefan, if you see carefully, test case 6 asks for the *next to next* lexicographic permutation of 'DOG', which is 'GOD'.
Solution Comments
Show commentsProblem Recent Solvers49
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1520 Solvers
-
Reverse the Words (not letters) of a String
424 Solvers
-
Compress strings (not springs)
198 Solvers
-
Get the length of a given vector
8923 Solvers
-
495 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!