Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement