Java Reference
In-Depth Information
19
Searching, Sorting and Big O
With sobs and tears
he sorted out
Those of the largest size …
—Lewis Carroll
Attempt the end, and never
stand to doubt;
Nothing's so hard, but search
will find it out.
—Robert Herrick
'Tis in my memory lock'd,
And you yourself shall keep the
key of it.
—William Shakespeare
It is an immutable law in
business that words are words,
explanations are explanations,
promises are promises — but
only performance is reality.
—Harold S. Green
Objectives
In this chapter you'll:
Search for a given value in an
array using linear search and
binary search.
Sort arrays using the iterative
selection and insertion sort
algorithms.
Sort arrays using the recursive
merge sort algorithm.
Determine the efficiency of
searching and sorting
algorithms.
Introduce Big O notation for
comparing the efficiency of
algorithms.
 
 
Search WWH ::




Custom Search