Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void promeni_lista(SLL<Integer> lista, int position) {
- SLLNode<Integer> d1 = lista.getFirst();
- SLLNode<Integer> prev = null;
- int i = 0;
- while (i < position) {
- prev = d1;
- d1 = d1.succ;
- i++;
- }
- prev.succ = d1.succ;
- System.out.println(lista.toString());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement