14 lines
250 B
Go
14 lines
250 B
Go
package ds
|
|
|
|
type LinkedListStack[T any] struct {
|
|
*ListStack[T]
|
|
}
|
|
|
|
var _ Stack[int] = &LinkedListStack[int]{}
|
|
|
|
func NewLinkedListStack[T any]() *LinkedListStack[T] {
|
|
return &LinkedListStack[T]{
|
|
ListStack: NewListStack[T](NewLinkedList[T]()),
|
|
}
|
|
}
|