Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vivmost/trie_ds
https://github.com/vivmost/trie_ds
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/vivmost/trie_ds
- Owner: vivmost
- Created: 2021-11-02T05:06:58.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-03T08:23:33.000Z (about 3 years ago)
- Last Synced: 2024-08-05T23:34:22.483Z (6 months ago)
- Language: Java
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Trie
A datastructure for extremely fast prefix/fuzzy string searches.## Usage
Create a Trie with:
``` Java
Trie objName = new Trie();
```Add with -> insert:
``` Java
// insert can add information.
objName.insert("Search");
```Search with -> search:
``` Java
// search can look for added information.
objName.search("Search");
```Delete with -> delete
``` Java
// delete can delete added information
objName.delete("Search");
```Checks is there a data starting with -> startsWith
``` Java
//startswith checks whether information starts with particular string or not
objName.startsWith("Se");
```Check Empty or not with -> isEmpty
``` Java
// isEmpty checks whether trie is empty or not
objName.isEmpty(objName.root);
```