源码
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://stackoverflow.com/questions/55113713/time-space-complexity-of-in-built-python-functions
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/280670.html