Follow Me

Deque exercises in C Programming in C

  • Implementation of a deque: A deque is a data structure that allows both deletion as well as insertion of elements to be done at both ends of a queue.¬†Consider the following code: \(\texttt{typedef $\cdots$ element ;}\\\texttt{struct cell \{ element data; struct cell *next; \}}\\\texttt{typedef struct \{ struct cell *front, *rear; \} deque;}\)...
  • Implementation of a deque using a doubly-linked list: Implement a deque using a doubly-linked list....
  • Implementation of a deque using a circular list: Implement a deque using a circular list....
  • Static implementation of a deque: A deque is a data structure that allows both deletion as well as insertion of elements to be done at both ends of a queue.¬† Implement a deque using a circular array....
  • Maximum sum in sliding window: Given array \(\texttt{A[]}\) with sliding window of size \(\texttt{w}\) which is moving from the very left of the array to the very right. Assume that we can only see the \(\texttt{w}\) numbers in the window. Each time the sliding window moves rightw...
  • Implementation of a deque using a doubly circular linked list: Implement a deque using a doubly circular linked list....

Back to the list of exercises