Difference: CSC121S2022Lab10 (2 vs. 3)

Revision 32022-04-05 - cathybareiss

Line: 1 to 1
 
META TOPICPARENT name="CSC121SylS2022"

Tenth lab: Should I sort before searching?

Learning Objective(s)

Line: 14 to 14
 
    • Recursive binary search on ordered data (not from the web)
    • Selection or insertion sort (via the specific algorithm we cover in class -> not something you found on the web!)
  • Because these are very well known and used algorithms, you can easily find this code on the web. DO NOT DO THAT. You may ONLY use class notes, class examples, previous code you have written, the textbooks from class, the assistants (Micah and Jonathan) and your classmates. Use of anything else will be consider cheating!
Added:
>
>
    • An additional resource that is allowed for this lab is : Object-Oriented Data Structures Using JAVA, Third edition by Nell Dale, Daniel Joyce and Chip Weems (Chapter 10.2 for simple sorts.)
  • There are at most 200,000 numbers in the first file. There is no limit for the number of numbers in the second file.
 
  • Count the number of comparisons in each algorithm
  • The two files are to be specified at the command line. The first is the list of numbers to be search (and maybe sorted). The second is the list of number of to searched for.
  • The program should be called Analysis
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback