I Jus wanna Kno if my code is correct? if there is any errors please let me know
front = -1
rear = -1
size = 0
// Enqueue circular structure
public void Enqueue () { if (size < maxSize) { rear = rear + 1; } Queue [rear] = e; size =+ 1; if (rear + 1 == maxSize) { rear = -1; } }
// Dequeue circular Structure
public E dequeue() { if (size = 1) { size += 1; front++; e = Queue[front + 1]; } if (front++ == 0) { return e; }