hammamikhairi / RadixTree

An implementation of the Radix Tree data structure in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Radix Tree

What is a Radix Tree

a radix tree (also radix trie or compact prefix tree) is a data structure that represents a space-optimized trie in which each node that is the only child is merged with its parent.

Radix Tree

Usage

  // initialize tree
  tree := Radix.TreeInit()

  // add a word to the tree
  tree.Addword("khairi")

  // fill the tree with words from a csv file
  err := tree.FillTree("data.csv")

  // search for a word in the tree
  found := tree.SearchTree("khairi")

  // auto complete a given sub string
  propNumber := tree.AutoComplete(input, false)

Installation

go get github.com/hammamikhairi/RadixTree

LFSA 88

This project is a part of LFSA 88.

License

This package is licensed under MIT license. See LICENSE for details.

About

An implementation of the Radix Tree data structure in Go

License:MIT License


Languages

Language:Go 100.0%