{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


if the items are dense m log n if log complexity

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lexity: O(n*m) Time ! If the number of digits is a constant, If complexity is O(n)! ! If the items are dense, m ≈ log n, If log complexity complexity is O(n log n) log ! 15 Sorting Sorting Summary ! ! There are many sorting algorithms Choice Choice of sorting algorithm depends on application, expected input, and available time/space time/space for implementation: – For small or almost sorted input: consider For simple simple insertion sort – If sequential access is preferred: consider If merge merge sort – If input is distributed uniformly: consider If bucket bucket sort – If in-place sorting is not important: consider place quicksort 16...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online