Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (index < (size >> 1)) {
- Node<E> x = head;
- for (int i = 0; i < index; i++)
- x = x.next;
- next = x;
- } else {
- Node<E> x = tail;
- for (int i = size - 1; i > index; i--)
- x = x.prev;
- next = x;
- }
Add Comment
Please, Sign In to add comment