556
  • 2024-08-18LeetCode 556. 下一个更大元素 III(next_permutation())
    题目:556.下一个更大元素III思路:用到next_permutation(),细节看注释。next_permutation、prev_permutationclassSolution{public:intnextGreaterElement(intn){ //转变为string类型,便于调用next_permutation()strings=to_string(n);