User Tools

Site Tools


searching_a_arraylist_of_string

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
searching_a_arraylist_of_string [2021/01/21 12:03]
frchris created
searching_a_arraylist_of_string [2021/01/21 12:06] (current)
frchris
Line 1: Line 1:
 **Searching an ArrayList of String** **Searching an ArrayList of String**
  
-The starter code will make a very short ArrayList<String> and you can add to the main list to test the methods that you will write:+The starter code {{ ::seek.java |Seek.java}} will make a very short ArrayList<String> and you can add to the main list to test the methods that you will write:
   - A Linear Search   - A Linear Search
   - A Binary Search using iteration (loops)   - A Binary Search using iteration (loops)
   - A Binary Search using recursion.   - A Binary Search using recursion.
  
-<CODE>+{
 import java.util.ArrayList; import java.util.ArrayList;
 public class Seek public class Seek
Line 47: Line 47:
     public int linearSearch(String str)     public int linearSearch(String str)
     {     {
-        // your code herr+        // your code here
         return -1;         return -1;
     }     }
     public int binarySearchLoop(String str)     public int binarySearchLoop(String str)
     {     {
-        // your code herr+        // your code here
         return -1;         return -1;
     }public int binarySearchRecursive(String str)     }public int binarySearchRecursive(String str)
     {     {
-        // your code herr+        // your code here
         return -1;         return -1;
     }     }
Line 74: Line 74:
 } }
  
-</CODE>+}
searching_a_arraylist_of_string.1611248615.txt.gz ยท Last modified: 2021/01/21 12:03 by frchris