when we call the size function for secondary queue then it goes to the size function but size function as taught in the video returns size of primary queue, i am confused how size function is returning the values when actually written in code its just returning the size of primary queue.
About the size function
Here secondary and primary are objects of the queue class. Now if we pass any object whether its primary or secondary we will get the size of the object through which we called our method.
It means that the only thing that matters is from which object of the class the method is called.
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.