The basic idea is that the process with least token (number) value (not 0) will execute their critical
But in the second while condition (number[i],i < number[j],j) meant that process i will wait which is contradicting the fact that the process with least token value should execute.
I feel it should be ,
‘process i’ will wait if
(number[i],i > number[j],j)