In this commit I have:

Added JavaDoc to every package except for "heaps"
This commit is contained in:
zacharyjones123
2017-04-18 07:57:17 -07:00
parent 94871b7e6a
commit 9411d5be56
29 changed files with 1406 additions and 425 deletions

View File

@@ -1,7 +1,10 @@
import java.util.Scanner;
public class LinearSearch{
//Main method
/**
* The main method
* @param args Command line arguments
*/
public static void main(String[] args){
Scanner input = new Scanner(System.in);
@@ -27,7 +30,13 @@ public class LinearSearch{
}
//Linear search method
/**
* Linear search method
*
* @param list List to be searched
* @param key Key being searched for
* @return Location of the key
*/
public static int linearsearch(int[] list, int key){
for (int i = 0; i< list.length; i++){
@@ -37,7 +46,11 @@ public class LinearSearch{
} return -1;
}
//Helper method
/**
* Helper Method
*
* @param a array to be printed
*/
public static void printarray(int[] a){
System.out.print("The array is: ");
for( int d: a){