Giter VIP home page Giter VIP logo

skip_tree's Introduction

Overview

This data structure uses a binary tree format to store ordered data. Rather than constructing the tree dynamically as data is input, this data structure pre-structures a binary tree the size of the input space at initialization, and then fills in this tree as data is added. This leads to some interesting properties, namely that the insertion and deletion operations get faster as the tree gets denser. Each node in the tree has two sets of children and parents. The first set is generated at initialization and remains static through the life of the tree. The second set are used to navigate the data the has been input thus far, and thus dyanmic in the runtime. This is not a balanced search tree, however the degree of inbalance is bounded by the height of the tree (O(log(N)).

Properties

Letting N be the input space size and n be the current number of elements held by the tree, the upper bounds on different operations is as follows:

  • Insertion: O(log(N - n))
  • Deletion: O(log(N - n))
  • Next/Previous element lookup: O(log(n))
  • Membership test / Key-Value lookup: O(1)

skip_tree's People

Contributors

sprw121 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.