Can you please explain me properly whats going on in the push function

as push takes data as input so what happens to r please clarify.

Hey @adarshsingh2k
void push( Data to be pushed)
{
. if( Queue is not full that means we can push in queue)
.{
… We move rear to next location now assume r is at maxsize-1 so we will go to 0 to push our data
…We push data at the posn
…we increment the size of our queue.
.}
}

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.