How are we going to choose which data structure will be more appropriate for ques . Like can you give me a walkthrough that how we will choose bw stacks and queues in this ques?
I am having a problem
Different data structures have different implementations and are used in different ways to, as of stack, I can tell you that whenever you see a problem having increasing and decreasing sequence and you have to work on this property. Then it might be a problem that can be solved using stack, whereas queue can be used when you have to find something bigger and smaller on indexes.
This will come with time, practice different questions on each data structure and you will get an intuition that which ds can be used 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.