Can’t we just implement Queue as we have implemented in the case of a stack?
Is writing constructor in the class Queue necessary?
hi @gvspraveen113 constructors are essential for initialising variables, so they can be used by other functions. You can of course choose not to initialise using the constructor and find an alternative method, but this is the best practice
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.