Complete the code to declare a node struct for a doubly linked list.
typedef struct Node {
int data;
struct Node* next;
struct Node* [1];
} Node;The pointer to the previous node in a doubly linked list is commonly named prev.
Complete the code to move forward in a doubly linked list.
current = current->[1];To move forward in a doubly linked list, use the next pointer.
Fix the error in the code to move backward in a doubly linked list.
current = current->[1];To move backward in a doubly linked list, use the prev pointer.
Fill both blanks to insert a new node after the current node in a doubly linked list.
newNode->next = current->[1]; newNode->[2] = current;
When inserting after current, newNode's next points to current's next, and newNode's prev points to current.
Fill all three blanks to update pointers when inserting a new node after current in a doubly linked list.
if (current->next != NULL) { current->next->[1] = newNode; } newNode->[3] = current->next; current->[2] = newNode;
When inserting, update the next node's prev to newNode, current's next to newNode, and newNode's next to current's old next.
