Coder Social home page Coder Social logo

jeandersonbc / algorithms-and-ds Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 10.0 89 KB

Algorithms and Data Structures

License: GNU General Public License v2.0

C++ 13.65% Java 85.90% Shell 0.45%
algorithm datastructures cormen-algorithms java goldwasser goodrich

algorithms-and-ds's People

Contributors

jeandersonbc avatar

Stargazers

 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

algorithms-and-ds's Issues

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.

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.

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

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.

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.