How to calculate average waiting time for round robin cpu scheduling?
The average waiting time would depend on the order in which the processes are scheduled. Your round-robin scheduler does not mention of an optimization scheme to minimize the waiting time. Both schedules listed out are correct and produce the respective waiting times.