16.6.3 STL和string类

string类虽然不是STL的组成部分,但设计它时考虑到了STL。因此它包含:

  1. begin()
  2. end()
  3. rbegin()
  4. rend()
  5. ……

next_permutation( begin_iterator, end_iterator)算法:

### 将区间内容转换为下一种排列方式。

### 对于字符串,排列按照字母递增的顺序进行:

  • 成功:返回true
  • 失败:即已是最后序列,返回false

该算法属于就地算法,自动提供唯一的排列组合。

原文地址:https://www.cnblogs.com/suui90/p/13550704.html