feat: add LinkedQueue

This commit is contained in:
dudaodong committed 2022-02-11 10:46:48 +08:00
1 parent f551c56921
commit 43fb907a81
3 files changed
+189 -1

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ func NewStackNode[T any](value T) *StackNode[T] {
// QueueNode is a node in a queue, which have a Value and Next pointer points to next node in the queue.
type QueueNode[T any] struct {
Value T
Next *StackNode[T]
Next *QueueNode[T]
}
// NewQueueNode return a QueueNode pointer