Check if this code is correct for implementation of simple queue and not the circular queue.
Implementation of queue
When I push 8 it is stored at index 5 as the rear points to 5. But as our array is of size 5, then how the element at arr[5] is printed in the output? That’s my actual question, the element 8 should not be printed.
hi @Gurjot,
you were doing a little mistake in full function,
I have corrected it in this code.
Please let me know if there is any other doubt.