Solutions
Correct option is All of the above
CONCEPT:
A queue is an ordered linear data structure, following the FIFO strategy.
Insertion in a queue happens at the rear end and deletion happens at the front
BUT
Deque or Double Ended Queue is a linear data structure where the addition and removal of element(s) can happen from any end, i.e. head/front or tail/rear.
There is no restriction on the side from which addition/removal of elements should happen, so it can be used to implement a stack or queue in the program.
So all the applications of Stack and Queue can be performed by Deque
In the above question:
Checking whether parenthesis is balanced in an expression, Reversing a given string are the application of stack
Checking whether a string is a palindrome can be done using deque