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