github.com/golang-ds/linkedlist

Library of generic singly, doubly, and circularly linked-list data structures for Go.


License
MIT
Install
go get github.com/golang-ds/linkedlist

Documentation

linkedlist

Library of generic singly, doubly, and circularly linked-list data structures for Go.

Install

$ go get github.com/golang-ds/linkedlist

Singly LinkedList Usage

Import

import "github.com/golang-ds/linkedlist/singly"

Use

list := singly.New[int]()
list.AddFirst(1)

Doubly LinkedList Usage

Import

import "github.com/golang-ds/linkedlist/doubly"

Use

list := doubly.New[int]()
list.AddFirst(1)

Circularly LinkedList Usage

Import

import "github.com/golang-ds/linkedlist/circularly"

Use

list := circularly.New[int]()
list.AddFirst(1)

Todo

  • OfRange factory function
  • OfSlice factory function
  • Init(range, func) factory function