GithubHelp home page GithubHelp logo

heap-data-structure / about Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.95 MB

:fallen_leaf: Heap data structures for JavaScript

License: GNU Affero General Public License v3.0

fibonacci-heap javascript agpl computer-science data-structures heaps binomial-heap binary-heap brodal-queue pairing-heap

about's People

Contributors

gitter-badger avatar make-github-pseudonymous-again avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

about's Issues

js-heap-spec

create documentation repository for heap interfaces

Clean up this repository

This repository does not contain any code. Deprecate npm package and remove obsolete config files.

Find a better way to maintain length property

Some implementations do not need to remember the number of elements stored. But the user might want to know that. Options:

  • Write source with length computation then manipulate code at runtime to remove useless operations and properties?
  • Write two very similar implementations.
  • Use inheritance.
  • ...

O(n) makeheap

// >= 0 is necessary when arity = 1 and n = 0
for ( k = ( n + arity - 2 ) / arity | 0 ; k-- >= 0 ; ) {
    siftdown( arity , compare , swap , a , 0 , n , k ) ;
}

explore other implementations of binomial heaps

  1. use a backreference to keep track of nodes instead of swapping childrens
    • faster because we only need to swap values and backreferences
    • additional memory used
  2. implementation only supporting push pop and merge

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.