字典序(next_premutation和prev_premutation的用法)
字典序(next_premutation和prev_premutation的用法)next_permutation函数作用功能功能描述完整过程prev_permutation函数完整过程
next_permutation函数
作用
此函数既有排序作用也有判断(bool)作用。
功能
此函数功能十分强大,它对整数类型和字符类型的数组都能进行排序。
功能描述
以字符类型为例:
char s[20] = "abc";
当使用next_permutation(s, s+3)时,它会判断字符数组 “abc” 的下一
原创
2021-02-08 23:15:54 ·
434 阅读 ·
0 评论