我正在准备算法考试,并且有以下问题:如果我们为insertion sort algorithm
提供一个排序列表,它是否仍需要O(n ^ 2)?
No it should run in O(n) time as this is the best case for this algorithm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.