Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 562 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 562 Bytes

go-ds

A well-tested and reliable golang lib of all the common data structures.

Install

go get github.com/souvikhaldar/go-ds/bst

Instructions

  • Create a binary search tree, insert items, then print in sorted order (i.e In-Order traversal)
package main

import "github.com/souvikhaldar/go-ds/bst"

func main() {
	t := bst.NewIterativeBst()
	t.Insert(5)
	t.Insert(9)
	t.Insert(1)
	t.Insert(1)
	t.Insert(3)
	t.InOrder()

}

Output:

go run minMaxBst.go

1
1
3
5
9

Example use of graph