Doubt on value of rear

In this he has said that value of rear will be initialised as capacity-1. But for an empty queue shouldnt it be 0?
In the last video also he took it as zero.

It doesn’t really matter. I mean it depends on how you wish to implement your queue. If while doing your enqueue operation , you wish to first increment rear and then add value at rear , then you should initialize rear to capacity - 1 and if you wish to first put value at rear and then increment it, then you should initialize it to 0.

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.