Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void mirror(){
- if (first != null) {
- SLLNode<E> tmp = first;
- SLLNode<E> newsucc = null;
- SLLNode<E> next;
- while(tmp != null){
- next = tmp.succ;
- tmp.succ = newsucc;
- newsucc = tmp;
- tmp = next;
- }
- first = newsucc;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement