"循环体外创建string,内部用clear代替直接创建string"。Linear in the size of the string, although existing implementations operate in constant time. 感觉得看具体string的实现,如果clear是O(n)的话,其实和内部每次创建差不多。
1 1

相关推荐

给🐭🐭个面试机会...:我擦seed✌🏻
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务