sv-tools / gqueue

Generic Queue implementation in Go using linked list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gqueue

Generic Queue implementation in Go using linked list

Usage

s := gqueue.New(1, 2, 3, 4)
fmt.Println(s.Len())
fmt.Println(s.Pop())
fmt.Println(s.Pop())
fmt.Println(s.Pop())
fmt.Println(s.Pop())
s.Push(5)
fmt.Println(s.Peek())
// Output: 4
// 1
// 2
// 3
// 4
// 5

About

Generic Queue implementation in Go using linked list

License:MIT License


Languages

Language:Go 100.0%