ds/impl_stack_linked_list.go

9 lines
184 B
Go
Raw Normal View History

2023-01-20 21:48:46 +01:00
package ds
type LinkedListStack[T any] ListStack[T]
func NewLinkedListStack[T any]() *ArrayStack[T] {
stack := NewListStack[T](new(LinkedList[T]))
return (*ArrayStack[T])(stack)
}