Skip to content

A prefix sorting radix tree designed specifically for working with words, providing fuzzy search functionality, prefix filtering for autocomplete

Notifications You must be signed in to change notification settings

multiverse-os/radix

Repository files navigation

Multiverse OS Logo

Multiverse OS: radix trie library

URL multiverse-os.org

A simple prefix sorting radix tree designed specifically for working with words, providing fuzzy search functionality, prefix filtering for autocomplete.

Examples

A simple example using the .String() function provided which prints out the current state of the trie.

package main

import (
	"fmt"

	radix "github.com/multiverse-os/cli/radix"
)

func main() {
	fmt.Println("radix trie example")
	fmt.Println("==================")

	tree := radix.New()
	tree.Add("romane", 112)
	tree.Add("romanus", 11)
	tree.Add("tuber", 44)
	tree.Add("romulus", 4)
	tree.Add("ruber", 8)
	tree.Add("tubular", 99)
	tree.Add("rubens", 9)
	tree.Add("tub", 3)
	tree.Add("rubicon", 44)
	tree.Add("rubicundus", 71)

	fmt.Printf("%s", tree.String())
}

About

A prefix sorting radix tree designed specifically for working with words, providing fuzzy search functionality, prefix filtering for autocomplete

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages