mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-07 22:22:29 +08:00
feat: add stacklink.go implements stack with link
This commit is contained in:
@@ -15,7 +15,7 @@ func NewLinkNode[T any](value T) *LinkNode[T] {
|
||||
// StackNode is a node in stack, which have a Value and Pre points to previous node in the stack.
|
||||
type StackNode[T any] struct {
|
||||
Value T
|
||||
Pre *StackNode[T]
|
||||
Next *StackNode[T]
|
||||
}
|
||||
|
||||
// NewStackNode return a StackNode pointer
|
||||
|
||||
Reference in New Issue
Block a user