This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package linkedListFinal; | |
| public class LinkedList<E> { | |
| Node head; // head of list | |
| //Method to insert a new node | |
| public void add(E data) { | |
| // Create a new node with given data | |
| Node new_node = new Node(data); | |
| // If the Linked List is empty, | |
| if (head == null) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.*; | |
| public class numGuess { | |
| static Scanner sc = new Scanner(System.in); | |
| public static void main(String[] args) { | |
| play(true); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class arrShift { | |
| public static void main(String[] args) { | |
| int [] arr = {1,2,3,4,5,6,7,8,9,10}; | |
| int len = arr.length; | |
| int shift = 2; | |
| System.out.println("Original Array: "); | |
| display(arr); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.*; | |
| public class bubblesort { | |
| public static void main (String[]args) { | |
| int[]nums = {5,9,3,4,12,10,1,2,6}; | |
| int n = nums.length; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| //Generics | |
| public class davisList<E>{ | |
| private static final int DEFAULT_SIZE = 10; //Constant | |
| private Object [] arr; | |
| private int index = 0; | |
| public davisList() { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| import java.util.*; | |
| public class davisListRunner { | |
| public static void main(String[]args) { | |
| davisList <Integer> nums = new davisList <Integer>(); | |
| Random rand = new Random(); | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| public class davisListRunner { | |
| public static void main(String[]args) { | |
| DavisLinkedList <String> names = new DavisLinkedList <String>(); | |
| names.addE(new Node<String> ("Tyrone")); | |
| names.addE(new Node<String> ("Peter")); | |
| names.addE(new Node<String> ("Davis")); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| public class DavisLinkedList <T>{ | |
| private Node head = null; | |
| //adds to front | |
| public void add (Node n) | |
| { | |
| n.setNext(head); | |
| head = n; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| public class Node <T> { | |
| private T data; | |
| private Node next; | |
| public Node(T value) { | |
| data = value; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package postAP; | |
| public class davisListRunner { | |
| public static void main(String[]args) { | |
| davisList <Integer > nums = new davisList <>(); | |
| for(int i = 0; i < 100; i++) { | |
| System.out.println(nums.getSize()); |