I am looking at the following two functions of two operations of a queue:
Insert(Q,x)
Q[end[Q]] <- x
if end[Q]=length[Q] then
end[Q] <- 1
else
end[Q] <- end[Q]+1
Delete(Q)
x <- Q[head[Q]]
if head[Q]=length[Q] then
head[Q] <- 1
else
head[Q] <- head[Q]+1
return x
Could you explain me the "if-else" statements??