1 changed files with 12 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
package llist |
||||
|
|
||||
|
type LinkedList[T any] struct { |
||||
|
size uint |
||||
|
head *Node[T] |
||||
|
tail *Node[T] |
||||
|
} |
||||
|
|
||||
|
type Node[T any] struct { |
||||
|
elem T |
||||
|
next *Node[T] |
||||
|
} |
Loading…
Reference in new issue