Frage im Vorstellungsgespräch bei Amazon

What sorting algorithm I would use for sorting an array?

Antworten zu Vorstellungsgespräch

Anonym

9. Mai 2019

Depends on the size of the array. Insertion sort for small, quick sort for large

2

Anonym

1. Apr. 2019

Quick sort

2

Anonym

9. Mai 2019

Also, if array is in ascending or descending order QS will be n^2. Would be better to use merge sort.