生成字典序排列(C++ STL) next_permutation函数

来源:互联网 发布:light.js 编辑:程序博客网 时间:2024/05/29 18:02

生成下一个字典序排列

#include <algorithm>

bool next_permutation( iterator start, iterator end );

The next_permutation() function attempts to transform the given range of elements [start,end) into
the next

lexicographically greater permutation of elements. If it succeeds, it returns true, otherwise, itreturns false.

原创粉丝点击