14 lines
240 B
Go
14 lines
240 B
Go
package ds
|
|
|
|
type ArrayQueue[T any] struct {
|
|
*ListQueue[T, *ArrayList[T]]
|
|
}
|
|
|
|
var _ Queue[int] = &ArrayQueue[int]{}
|
|
|
|
func NewArrayQueue[T any]() *ArrayQueue[T] {
|
|
return &ArrayQueue[T]{
|
|
ListQueue: NewListQueue[T](NewArrayList[T](0)),
|
|
}
|
|
}
|