14 lines
240 B
Go
14 lines
240 B
Go
package ds
|
|
|
|
type ArrayStack[T any] struct {
|
|
*ListStack[T, *ArrayList[T]]
|
|
}
|
|
|
|
var _ Stack[int] = &ArrayStack[int]{}
|
|
|
|
func NewArrayStack[T any]() *ArrayStack[T] {
|
|
return &ArrayStack[T]{
|
|
ListStack: NewListStack[T](NewArrayList[T](0)),
|
|
}
|
|
}
|