Git Product home page Git Product logo

algorithms-and-ds's Issues

Review problem in swap-area

The program seems to be correct but not fast enough. Probably, some kind of Lazy-Propagation technique will solve this issue.

Iterative heapfy

6.2-5
The code for MAX-HEAPIFYis quite efficient in terms of constant factors, except
possibly for the recursive call in line 10, which might cause some compilers to
produce inefficient code. Write an efficient MAX-HEAPIFYthat uses an iterative
control construct (a loop) instead of recursion.

Reorganize repository

This repository should be organized by problems:

ROOT
|
`--- algorithms
|     |
|     `--- The Sorting Problem
|     |     |
|     |     `--- README.md (problem description)
|     |     |
|     |     `--- java-src
|     |     |
|     |     `--- cpp-src
|     |     |
|     |     `--- (other-languages)-src
|     |
|     `--- (other categories...)
| 
`--- .gitignore
|
`--- LICENSE.md
|
`--- README.md

Analyzing performance

It's clearly visible that the SlowCounter.java solution is faster than the FasterCounter.java, although FasterCounter is asymptotically faster than SlowCounter for N = 10^4.

This is also a problem of figuring out a value of N where the Insertion Sort is faster than Merge Sort.

What would be a proper way to test different inputs and find the value of N?
By finding it, it's possible to improve the Merge Sort to use Insertion Sort for input <= N.

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.