A doubly linked list is declared as:
struct Node {
int Value;
struct Node *Fwd;
struct Node *Bwd;
};
Where Fwd and Bwd represent forward and backward link to the adjacent elements of the list. Which of the following segment of code deletes the node pointed to by $X$ from the doubly linked list, if it is assumed that $X$ points to neither the first nor the last node of the list?
- X$\rightarrow$Bwd$\rightarrow$Fwd = X$\rightarrow$Fwd; X$\rightarrow$Fwd$\rightarrow$Bwd = X$\rightarrow$Bwd;
- X$\rightarrow$Bwd.Fwd = X$\rightarrow$Fwd; X.Fwd$\rightarrow$Bwd = X$\rightarrow$Bwd;
- X.Bwd$\rightarrow$Fwd = X.Bwd; x$\rightarrow$Fwd.Bwd = X.Bwd;
- X$\rightarrow$Bwd$\rightarrow$Fwd = X$\rightarrow$Bwd; X$\rightarrow$Fwd$\rightarrow$Bwd = X$\rightarrow$Fwd;