2023-01-20 21:48:46 +01:00
|
|
|
package ds
|
|
|
|
|
2023-01-20 22:05:08 +01:00
|
|
|
type ArrayQueue[T any] struct {
|
|
|
|
*ListQueue[T]
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ Queue[int] = &ArrayQueue[int]{}
|
2023-01-20 21:48:46 +01:00
|
|
|
|
|
|
|
func NewArrayQueue[T any]() *ArrayQueue[T] {
|
2023-01-20 22:05:08 +01:00
|
|
|
return &ArrayQueue[T]{
|
|
|
|
ListQueue: NewListQueue[T](NewArrayList[T](0)),
|
|
|
|
}
|
2023-01-20 21:48:46 +01:00
|
|
|
}
|