queue q; what is this? how we use it ?where we use it? is there any header file to acces it?
1 Like
I think you must be knowing that queue is abstract data type.See here. And to use queue in your program, you would have to write its whole code (push, pop and other functions). Now, to avoid all that overhead, there are libraries in C++ and Java which allow you to use queue and its functions directly in your program.
In C++, you would have to include queue header file. For more details and how to use its functions , see here. In Java, queue is defined in the collections. For more details and how to use its functions, see here and here.
thanks shivam217
Hi Rahul, if you got the answer, then please accept the answer so that question can be closed. Thanks.