R语言代写 | R代写 | 算法代写 - 数据系列联系 R语言代做
发布时间:2021-08-03 23:31:25浏览次数:
the worst case is that all arrays have been considered。 so thesearch time is the sum of (1, 2, 4, 8 n/2)size binary search.so the worst time O(log(n) + log(n/2) + log(n/4) + . . . + 1) =O(log2(n))c. the worst insertion is that when insert new array at the linkedlist, then we need merge until only one array left in the linkedlist.so the worst time is O(log n)d. as table shows, double seperate blank ( || ) means that after insertion,the set contains only one array.| insert | 1 || 2 || 3 | 4 || 5 | 6 | 7 | 8 || | | || || | || | | | || | cost | 1 || 2 || 1 | 4 || 1 | 2 | 1 | 8 || suppose that 2^{k-1}