mirror of
https://github.com/lWolvesl/leetcode.git
synced 2026-06-04 02:21:15 +08:00
9 lines
169 B
C++
9 lines
169 B
C++
#include <string>
|
|
|
|
class Solution {
|
|
public:
|
|
std::string reversePrefix(std::string s, int k) {
|
|
std::reverse(s.begin(),s.begin()+k);
|
|
return s;
|
|
}
|
|
}; |