Queue•Easy
Front Operation
Queue Front / Peek Operation

The Front (or Peek) operation allows you to retrieve or inspect the element at the front of the queue without removing it.
Key Rules
- Underflow Check: Before accessing the front element, verify if the queue is empty. In a linear queue, if
front === -1orfront > rear, the queue contains no elements. Attempting to access the front element results in a Queue Underflow condition. - Read Front Value: If elements exist, return
queue[front]. Do NOT increment thefrontpointer. The queue remains unchanged.