problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
leetcode::check_if_all_as_appears_before_all_bs::Solution类 参考

#include <leetcode.h>

静态 Public 成员函数

static bool checkString (const string &)
 

详细描述

在文件 leetcode.h185 行定义.

成员函数说明

◆ checkString()

bool leetcode::check_if_all_as_appears_before_all_bs::Solution::checkString ( const string &  s)
static

在文件 leetcode.cpp330 行定义.

330 {
331 bool flag = true;
332 for(const char ch: s) {
333 if(ch == 'a') {
334 if(!flag) {
335 return false;
336 }
337 } else if(ch == 'b') {
338 flag = false;
339 }
340 }
341 return true;
342 }

被这些函数引用 leetcode::check_if_all_as_appears_before_all_bs::TEST().


该类的文档由以下文件生成: