CMPSC 32 Chapter Notes - Chapter 12: Linked List, Prime Number, Meridian Regional Airport
Document Summary
Data structures and other objects using c++ - chapter. Serial search = an algorithm that steps through part of an array one item at a time, looking for a desired item. Stops when item is found or when the search has examined each item without success. Worst-case running time = the running time for the hardest inputs. For serial search, this is when the target is not in the array. For an array of n elements, the worst-case time for serial search requires n array accesses. Average-case running time = the average of the running times for all different inputs of a particular kind. For an array of n elements, the average-case time for serial search to find an element that is in the array requires array accesses. Best-case running time = the smallest of all the running times on inputs of a particular size.