Find the n th term of the list of numbers 1/ root 2, -2 , 4 root 2 , -16, ...
Answers
Answered by
3
Merges two root lists together
private Node meld(Node x, Node y) {
if (x == null) return y;
if (y == null) return x;
x.prev.next = y.next;
y.next.prev = x.prev;
x.prev = y;
y.next = x;
return x;
}
private Node meld(Node x, Node y) {
if (x == null) return y;
if (y == null) return x;
x.prev.next = y.next;
y.next.prev = x.prev;
x.prev = y;
y.next = x;
return x;
}
shanujindal48p68s3s:
Its nice that you put a programming solution but i think that he needed a exam solvable solution ^_^
Similar questions