Oktatás * Programozás 2 * Szkriptnyelvek * Adator. prog. Teaching * Prog. for Data Sci. (TODO) Félévek Linkek * kalendárium |
DLang /
Lexicographically next permutationSee also https://dlang.org/phobos/std_algorithm_sorting.html#.nextPermutation The lexicographic permutations of [0, 1, 2] are: 012, 021, 102, 120, 201, 210.
Output: [0, 1, 2] [0, 2, 1] [1, 0, 2] [1, 2, 0] [2, 0, 1] [2, 1, 0] --- false [0, 1, 2] Notes:
|
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |