=====next_permutation===== Syntax: #include bool next_permutation( bidirectional_iterator start, bidirectional_iterator end ); bool next_permutation( bidirectional_iterator start, bidirectional_iterator end, StrictWeakOrdering cmp ); 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. If a strict weak ordering function object cmp is provided, it is used in lieu of the < operator when comparing elements. Related Topics: [[prev_permutation]], [[random_sample]], [[random_sample_n]], [[random_shuffle]]