A queue is a variable-size, ordered collection of elements. Unlike arrays, you can easily add or remove elements from either end without having to resize manually.
// Unbounded queue (can grow indefinitely)
int q [$];
// Bounded queue (max 10 elements)
int bounded_q [$:9];
// Initialize with values
int q2 [$] = '{1, 2, 3, 4, 5};
Key Difference from Dynamic Arrays
Dynamic arrays require new[] to resize. Queues resize
automatically when you add or remove elements.