SHARE
TWEET

Untitled

a guest Apr 20th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Main {
  2.   public static void main(String[] args) {
  3.     SingleLinkedList test = new SingleLinkedList();
  4.     test.prepend(2);
  5.     test.append(3);
  6.     test.append(4);
  7.     test.append(5);
  8.     test.append(6);
  9.     //test.deleteWithValue(4);
  10.     //test.deleteAtIndex(2);
  11.     //System.out.println(test.index(1));
  12.     //System.out.println(test.searchWithValue(7));
  13.     test.insert(1,9);
  14.     test.insert(4,11);
  15.     test.insert(6,13);
  16.     test.display();
  17.   }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top