in DS recategorized by
167 views
0 votes
0 votes
Consider a doubly linked list with the following operations:
- Insert First (\texttt{InsertFirst})
\\
- Insert Last (\texttt{InsertLast})
\\
- Remove First (\texttt{RemoveFirst})
\\
- Remove Last (\texttt{RemoveLast})
The following operations are performed:
\[
\begin{aligned}
    & \text{InsertFirst}(10) \\
    & \text{InsertLast}(32) \\
    & a = \text{RemoveFirst} \\
    & \text{InsertLast}(28) \\
    & \text{InsertLast}(17) \\
    & a = \text{RemoveFirst} \\
    & a = \text{RemoveLast}
\end{aligned}
\]
What is the value of \(a\) after these operations?
in DS recategorized by
167 views

1 Answer

1 vote
1 vote
17

Related questions