feat: add stacklink.go implements stack with link

This commit is contained in:
dudaodong committed 2022-02-04 22:42:51 +08:00
1 parent eb59d02a08
commit cee9bb538f
4 files changed
+174 -2

No files matched your search

+1 -1
View File
@@ -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