@w1024020103
2017-05-25T11:33:43.000000Z
字数 361
阅读 523
CS61B
B level
1、Give a best and worst case input for insertion sort.
best case: abcde
worst case: edcba
2、Which sort do you expect to run more quickly on a reversed array, selection sort or insertion sort?
See sorting comparisons (lec30) guide for more questions that involve all of our sorting algorithms.
seems to be the same. both are O(N^2)