Reverse Left Words

This commit is contained in:
2022-11-30 17:24:58 +08:00
parent 7b21a4bb3b
commit b13cfa00bb
5 changed files with 51 additions and 9 deletions

14
include/offer_58.hpp Normal file
View File

@@ -0,0 +1,14 @@
#ifndef OFFER_58_HPP
#define OFFER_58_HPP
#include <string>
using namespace std;
class Solution {
public:
string reverseLeftWords(string s, int n);
void reverseSubStr(string &s, int begin, int end);
};
#endif

View File

@@ -7,6 +7,7 @@ using namespace std;
class Solution {
public:
void reverseSubStr(string &s, int begin, int end);
string reverseWords(string s);
};