Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/absolutscottie/trie

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/absolutscottie/trie

  • v0.0.0-20210325165128-a5083faa87af
  • Source
  • Go
  • Socket score

Version published
Created
Source

TRIE

A quick implementation of a trie in Golang

Running tests

From the project root:

go test ./... --coverprofile=coverage.out

Example output:

ok  	github.com/absolutscottie/trie/pkg/trie	0.134s	coverage: 100.0% of statements

What is done?

  • Insert
  • Find
  • Tests for the above two functions

What needs to be done?

  • Delete (and tests)

Choices

I chose to use a map to store children. The other option was to allocate a 128 byte array which seemed wasteful. Either solution decouples time completxity for inserts and lookups from the number of items in the data structure.

FAQs

Package last updated on 25 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc