Sequential and Binary Searching

Seminar date: February 17

Good Morning! Welcome Back!!!

JAVACoffee

  1. Review equals method
    1. “identity” (location in memory)
    2. “state” (coder defined object content/data)
  2. Review Comparable (compareTo)
    1. not only determines if objects are equal, but also determines the value “weight” of objects.
    2. coder can compare objects in any way they want
    3. type casting<>
    4. comparing Strings (invoke compareTo method)
    5. can compare as many data types as you want with Comparable
  3. Review Comparator (compare)
    1. import Comparator
    2. external to “the” class so we can compare objects in any way we would like
    3. compare is of the tester class, you don’t have to mess with any code inside the class AND
    4. you can compare two objects anyway you would like

NEW: Sequential and Binary Searching

  1. Big O     
  2. Sequential (aka Linear searching)
  3. Binary Searching

 

Leave a comment