Socket
Socket
Sign inDemoInstall

search-trie

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    search-trie

A simple trie structure to perform search on texts in O(n) time, where n - number of characters in searched word.


Version published
Maintainers
1
Created

Readme

Source

search-trie

A simple trie structure to perform search on texts in O(n) time, where n - number of characters in searched word.

Super simple, Super fast, and just 45 lines long.

Trie

Trie is a basic Tree structure, also known as suffix tree.

Search-trie

Has even more simpler structure, optimized for a single build and a few searches afterwards. Search-tree does not compact Tree into the "suffix" Tree, speeding up the build process.

Usage

  • buildCharacterTrie - creates per "character" search.
  • buildWordTrie - creates per "word" search

Licence

MIT

FAQs

Last updated on 12 Dec 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc