CircularQueue represents a circular queue data structure.
| 18 | |
| 19 | // CircularQueue represents a circular queue data structure. |
| 20 | type CircularQueue[T any] struct { |
| 21 | items []T |
| 22 | front int |
| 23 | rear int |
| 24 | size int |
| 25 | } |
| 26 | |
| 27 | // NewCircularQueue creates a new CircularQueue with the given size. |
| 28 | // Returns an error if the size is less than or equal to 0. |
nothing calls this directly
no outgoing calls
no test coverage detected