Guest User

Untitled

a guest
Jan 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. package adt.skipList;
  2.  
  3. public class Testando {
  4.  
  5. public static void main(String[] args){
  6. SkipListImpl<Integer> lista = new SkipListImpl<Integer>(5);
  7. SkipNode<Integer>[] list;
  8.  
  9. lista.insert(5, 1);
  10. lista.insert(3, 2);
  11. lista.insert(4, 3);
  12. lista.insert(6, 4);
  13. list = lista.toArray();
  14.  
  15. for (int i = 0; i < lista.size(); i++){
  16. System.out.println(list[i]);
  17. }
  18.  
  19. System.out.println();
  20. lista.remove(3);
  21. list = lista.toArray();
  22.  
  23. for (int i = 0; i < lista.size(); i++){
  24. System.out.println(list[i]);
  25. }
  26. }
  27. }
Add Comment
Please, Sign In to add comment