Git Product home page Git Product logo

algorithms-and-ds's Introduction

Algorithms and Data Structures

"With advanced libraries and languages, you can accomplish some tasks without knowing Algorithms and Data Structures, but you can do much more with such knowledge. This is the bound between programmers and novices." (Robert Sedgewick - Algorithms Part 1)

About

I created this repository to practice more the subject. As I'm studying, I implement problems and algorithms and push them here.

Algorithms are organized by subjects (e.g. Searching, Sorting, etc...). For each problem, I create a common interface and have different classes implementing the problem's interface. I designed the classes to be concise and to provide enough information so you don't have to check any other files. Therefore, expect to see some duplicated code. The main concern here, is mastering the art of computer programming.

I hope you find the information here useful for you.

Contributing

I decided to put my code here for a reason: Learning is more fun when we work together, right? Contributions are always welcomed. Please, if you find anything wrong (e.g. bugs or wrong information), consider the following steps:

  1. Open a new Issue describing the problem
  2. Fork this project :)
  3. Fix the problem
  4. Add your name on the Copyright header of each modified file
  5. Submit a pull request (details here)

Guidelines

  • Tab x Space:

    • Please, consider replacing tabs for blank spaces.
  • Updating the copyright header:

    • Add your information, respecting the indentation (see the example below)
Contributors:
    Jeanderson Candido <http://jeandersonbc.github.io> - Issue #8
    FirstName LastName <contactInfo> - Issue #id
  • Committing changes:
Issue #id - Issue Title

Brief description of what your work

I know. Easy, right? :)

##References##

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

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.