Giter Club home page Giter Club logo

august-5-2015's Introduction

August-5-2015

Problem 1

Use a heap to implement a stack.

Problem 2

Use a heap to implement a queue

Problem 3

Use a heap to implement heap-sort function

Problem 4

Use a heap to find the k-th largest element in N items in roughly O(N) time when k is small or close to N

Problem 5

Create a median heap, which extracts the median, from a set of values using two heaps.

Problem 6

Give an O(n lg k) - time algorithm to merge k sorted lists into one sorted list, where n is the total number of elements in all the input lists

Additional information:

To speed up development and allow us to focus on the uses of the heap datastructure, here are links to libraries which implement the heap data structure (aka Priorty Queue). One Javascript implementation is provided in this repository in datastructures/

http://www.cplusplus.com/reference/queue/priority_queue/

http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html

https://docs.python.org/2/library/queue.html

gem install pqueue

http://www.rubydoc.info/gems/pqueue

https://www.npmjs.com/package/algorithms

Heap Visualization Tool

https://www.cs.usfca.edu/~galles/visualization/Heap.html

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.