1. 题目
2. 解法
2.1 解法二(模拟法)
- 时间复杂度
- 空间复杂度
- 代码
class Solution{
public:
vector<string_view> split(const string_view &str, char trim) {
int n = str.size();
vector<string_view> res;
int pos = 0;
while (pos < n) {
while (pos < n && str[pos] == trim) { //