Code Monkey home page Code Monkey logo

js-data-structures's People

Contributors

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

js-data-structures's Issues

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

js-fliplist

List with O(1) merge/reverse/insert/delete and dynamic pointers.
Merge can invalidate one of the list's iterators. Can be overcomed using union-find.

js-heap-spec

create documentation repository for heap interfaces

approximate maximum

Chan's algorithm [SoCG16]
encode data as a polynomial
A(x) = (sum f(x_i)^p)^(1/p)
approx f. = n^(1/p)
C(x) = (sum i f(x_i)^p)^(1/p)
p = 1/e log n
C(x)/A(x)
insert / delete is just addition subtraction of a value
use different buckets to avoid issues with points that are too close

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 ) ;
}

Top Tree

https://en.wikipedia.org/wiki/Top_tree

Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Maintaining information in fully dynamic trees with top trees, ACM Transactions on Algorithms (TALG), Vol. 1 (2005), 243–264, doi:10.1145/1103963.1103966
Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity, Journal of the ACM, Vol. 48 Issue 4(July 2001), 723–760, doi:10.1145/502090.502095
Donald Knuth. The Art of Computer Programming: Fundamental Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89683-4 . Section 2.3: Trees, pp. 308–423.
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7 . Section 10.4: Representing rooted trees, pp. 214–217. Chapters 12–14 (Binary Search Trees, Red-Black Trees, Augmenting Data Structures), pp. 253–320.
Tree Compression with Top Trees. BILLE, GOERTZ, LANDAU, WEIMANN 2013 arXiv:1304.5702 [cs.DS]

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.