8000 GitHub - Yoorkin/trie: A simple implementation of a Trie data structure in MoonBit
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Yoorkin/trie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trie

A trie, also known as a prefix tree, is a tree-like data structure that stores a collection of strings. This implementation provides the basic functionality of a trie, including inserting strings and searching for strings.

Usage

let trie = Trie::[("--search","search"), ("--switch","switch")]
trie.lookup("--search") |> print // Some("search")
let trie = trie.insert("-s", "s")
trie.lookup("-s") |> print // Some("s")
trie.lookup("--switch") |> print // Some("switch")

About

A simple implementation of a Trie data structure in MoonBit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0