Zhao70's Blog

next_permutaion&perv_permutation

函数声明

1
2
#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, it returns false.

我的代码

github