首页 > TAG信息列表 > STRINGLIB

python | split函数时间复杂度

源码 while (maxcount-- > 0) { while (i < str_len && STRINGLIB_ISSPACE(str[i])) i++; if (i == str_len) break; j = i; i++; while (i < str_len && !STRINGLIB_ISSPACE(str[i])) i++;是O(n)感谢:https://stack