Using this notation, you should know that search through a list is O(n) and binary search (through a sorted list) is log(n).
看到这个标记你就应该知道搜索链表的复杂度为O(n),进行二进制搜索时(已排序)的空间复杂度为log(n)。
Using this notation, you should know that search through a list is O(n) and binary search (through a sorted list) is log(n).
看到这个标记你就应该知道搜索链表的复杂度为O(n),进行二进制搜索时(已排序)的空间复杂度为log(n)。
应用推荐