From 5a7ac3abb0048c06da5310ba0bd45784166ddae4 Mon Sep 17 00:00:00 2001 From: SquidSpirit Date: Tue, 25 Feb 2025 00:08:10 +0800 Subject: [PATCH] feat: 31_next_permutation --- 31_next_permutation/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 31_next_permutation/main.cpp diff --git a/31_next_permutation/main.cpp b/31_next_permutation/main.cpp new file mode 100644 index 0000000..13f2883 --- /dev/null +++ b/31_next_permutation/main.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; + +class Solution { + public: + void nextPermutation(vector& nums) { + next_permutation(nums.begin(), nums.end()); + } +};