Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aminography/radixtree

An implementation of RadixTree data-structure, which is a great tool for indexing a large number of records with string keys.
https://github.com/aminography/radixtree

data-structures indexing prefix-search prefix-tree radix-tree radix-trie tree-structure

Last synced: 20 days ago
JSON representation

An implementation of RadixTree data-structure, which is a great tool for indexing a large number of records with string keys.

Awesome Lists containing this project

README

        

# `RadixTree` :zap:
![mavenCentral](https://img.shields.io/maven-central/v/com.aminography/radixtree?color=blue)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5716eecf43294ddd9463e129cf6d6073)](https://www.codacy.com/gh/aminography/RadixTree/dashboard?utm_source=github.com&utm_medium=referral&utm_content=aminography/RadixTree&utm_campaign=Badge_Grade)

This project provides an implementation of [`RadixTree`](https://en.wikipedia.org/wiki/Radix_tree) data-structure, which is a great tool for indexing a large number of records with string keys and performing a prefix search with an optimal time complexity.


Table of Contents
-----------------
- [Main Characteristics](#main-characteristics)
- [Complexity Order](#complexity-order)


Main Characteristics
--------------------
- Space and time efficient.
- Retrieves elements sorted, when elements insertion is sorted.


Complexity Order
--------------------
`RadixTree` or compressed trie is the compact and space-optimized form of prefix tree,
which enables us to find all nodes whose keys start with a prefix string, by a `O(L + V)` complexity order, where `L` is the length of input
prefix, and `V` stands for number of nodes that will be discovered.

In case of large datasets, the length of keys are dramatically lower than number of items, which means that the time complexity of prefix search using `RadixTree` is significantly better than linear search.


Download
--------
**`RadixTree`** is available on `MavenCentral` to download using build tools systems.

### • Gradle
Add the following lines to your `build.gradle` file:

```gradle
dependencies {
implementation 'com.aminography:radixtree:1.2.0'
}
```

### • Maven
Add the following lines to your `pom.xml` file:

```xml


com.aminography
radixtree
1.2.0

```