Complete the code to add an element at the front of the deque.
deque.[1](10);
Use AddFirst to add an element at the front of the deque.
Complete the code to remove an element from the end of the deque.
int last = deque.[1]();Use RemoveLast to remove and return the element at the end of the deque.
Fix the error in the code to peek at the first element without removing it.
int first = deque.[1]();PeekFirst returns the first element without removing it from the deque.
Fill both blanks to create a deque and add elements at both ends.
var deque = new [1]<int>(); deque.[2](5);
Use LinkedList<int> to create a deque-like structure in C#. Use AddLast to add at the end.
Fill all three blanks to remove the first element, add a new element at the front, and peek at the last element.
int removed = deque.[1](); deque.[2](20); int last = deque.[3]();
First, remove the first element with RemoveFirst. Then add 20 at the front with AddFirst. Finally, peek at the last element with PeekLast.
