摘要: 1,用bisect 来搜索,内部算法就是二分查找法,时间复杂度O(log₂n) ##先看一个简单使用的例子 ##FluentPython 的例子 输出结果: 格式化字符串 官方文档介绍 2,bisect.insort() 向列表中插入值 输出: 阅读全文
posted @ 2018-08-16 11:48 水笔画家 阅读(726) 评论(0) 推荐(0)
摘要: 1,用bisect 来搜索,内部算法就是二分查找法,时间复杂度O(log₂n) ##先看一个简单使用的例子 ##FluentPython 的例子 输出结果: 格式化字符串 官方文档介绍 2,bisect.insort() 向列表中插入值 输出: 阅读全文
posted @ 2018-08-16 11:45 水笔画家 阅读(52) 评论(0) 推荐(0)