Coder Social home page Coder Social logo

rust-algorithms's Introduction

rust-algorithms's People

Contributors

abeybernard avatar agrism avatar aldrich2002 avatar alexfertel avatar aliencdh avatar bhlieberman avatar bogdanciocea avatar borghol avatar codingtil avatar craksy avatar curiouscorrelation avatar diplo2by avatar dlkritter avatar frederiksams avatar github-vektor avatar grabus avatar hanseldsouza avatar ilovethensa avatar joelstanleyd avatar jonakr avatar luizasilveira avatar mehtab228 avatar patilniraj8 avatar rsclip avatar strix12 avatar trolloldem avatar ymidori avatar zain2323 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  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

rust-algorithms's Issues

Improve duplication in the sorting algorithm tests

Currently, we have the assert_sorted! and assert_not_sorted! macros that make it easy to check that an array is sorted. But we have very similar tests for the sorting algorithms and it makes sense because the API of those algorithms should be the same or very similar: You take an array and sort it.

Therefore, I think it makes sense to come up with a new macro that represents our test suite for sorting algorithms, and then we can extend each local module with other tests that may be relevant to a specific algorithm like counting sort not relying on items being integers.

Add documentation

We want to document each class of algorithms. This comes in two flavors:

  • Adding README files to each directory holding a class of algorithms, for example, sorting.
  • Adding documentation comments to each of the algorithms.

You can find examples of documentation comments here.

General guidelines for the explanations are:

  • Be concise. Keep in mind these algorithms are meant for educational purposes.
  • Link to the bibliography.
  • Images are better than no images.
  • If it is possible, include time and space complexities.

Make tests in sorting algorithms consistent

Following the discussion in #35 it would be good to make tests consistent across sorting algorithm implementations such that they share a basic suite (calling the sorting_tests! macro) and then any other test that might be meaningful to that particular algorithm.

Revamp the Counting Sort implementation

The current implementation of Counting Sort supports sorting integers only, but it can be extended to support any form of object that is represented by an integer key.

Also, the current implementation is missing tests for stability. Since radix sort relies on this algorithms' property of being stable, it would be nice to assert that it is present.

  • Extend Counting Sort to the general case of having objects with integer keys.
  • Add tests that assert the stability of the algorithm.

Setup basic CI

It would be good to have CI for the project where we run the tests and formatting.

Right now the approach is to run the following commands before every push:

cargo fmt
cargo tests

This can be found in the git-config directory, with the related config in .gitconfig.

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.