Java Reference
In-Depth Information
BookByAuthor(String str) that given a string storing an author name,
collects all topics written by the author.
Exercise 6.2 (Selection sort and bisection search)
We would like to speed up the former search function for librarians
that manipulates large collections of topics. Implement the selection sort
algorithm on arrays of Book elements using the order of ISBN numbers
(International Standard Book Numbers). What is the time complexity
of this sorting algorithm? Consider the topics stored in a sorted array
according to their ISBNs. Provide a fast recursive dichotomic search
method for checking whether a book is inside the collection or not. What
is the time complexity of this bisection search?
Exercise 6.3 (QuickSort on arrays of strings)
Modify the QuickSort program so that it can operate on arrays of strings.
We shall use the lexicographic order defined on strings. Measure the time
spent by the various sorting and searching methods using the function
System.nanoTime();
Search WWH ::




Custom Search