#include <leetcode.h>
◆ repeatLimitedString()
string leetcode::construct_string_with_repeat_limit::Solution::repeatLimitedString |
( |
const string & |
s, |
|
|
int |
repeatLimit |
|
) |
| |
|
static |
在文件 leetcode.cpp 第 3211 行定义.
3213 for(
const char c: s) {
3216 auto oss = ostringstream();
3217 for(
int i = 25; i >= 0; i--) {
3220 oss << static_cast<char>(i +
'a');
3223 if(repeat == repeatLimit && ch[i] != 0) {
3224 for(
int j = i - 1; j >= 0; j--) {
3226 oss << static_cast<char>(j +
'a');
被这些函数引用 leetcode::construct_string_with_repeat_limit::TEST().
该类的文档由以下文件生成: