Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Searcher

    java.lang.Object
      Searcher

    public class Searcher

extends Object

Class that demonstrates search algorithms

Author:
  Mark Guzdial, Barb Ericson

Constructor Summary
`Searcher()`

Method Summary
`static String` | `binaryFind(String target, String[] list)` Method to use a binary search to find a target string in a sorted array of strings
`static String` | `linearFind(String target, String[] list)` Implement a linear search through the list
`static void` | `main(String[] args)` Main for testing binary find

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Searcher

    public Searcher()

Method Detail

### linearFind

    public static String linearFind(String target,
                                    String[] list)

  Implement a linear search through the list

### binaryFind

    public static String binaryFind(String target,
                                    String[] list)

  Method to use a binary search to find a target string in a sorted array of strings

### main

    public static void main(String[] args)

  Main for testing binary find

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD