Code Monkey home page Code Monkey logo

algo-1's Introduction

algo Build Status

This is just me fooling around and implementing various algorithms and data structures in Go, JavaScript, TypeScript, Rust, and Swift.

Many of these problems appear in Steven Skiena's Algorithm Design Manual, which I heartily recommend.

Modules do not share code and use built-in language features only. This makes each module easiest to understand individually.

Disclaimers

  • These modules are not optimized for performance.
  • These modules are not very well-tested, and definitely not intended for production use. If you do it anyway, please share your post-mortem :)
  • I don't have much experience with Rust, so there might be simpler and cleaner ways to do things.
  • Some older JS modules are written in ES 5.
  • Some older TS modules do not use features introduced in TS 1.6+.
  • Generics are avoided in favor of concrete types for simplicity.

Test a Go module

Install Go. Then run:

$ ./test_go mergesort

(Replace mergesort with the name of the module of your choice.)

Test a JavaScript module

Install Node.js and run npm install. Then run:

$ ./test_javascript mergesort

Test a TypeScript module

Install Node.js and run npm install. Then run:

$ ./test_typescript biconnected_components

Test a Rust module

Install Rust. Then run:

$ ./test_rust edge_connectivity

Test a Swift module

Install Swift. Then run:

$ ./test_swift rotating_calipers

Test all modules and languages

Install all the language-specific requirements above. Then run:

$ ./test

Test a module automatically after each source code change

Install all the language-specific requirements above and install rerun. Then run:

$ ./watch mergesort

Contribute

Pull requests are welcome. Improvements to existing modules will be merged as soon as possible. Completely new modules will take longer—this repo is a learning exercise, so I'll try to solve the problem on my own before merging.

algo-1's People

Contributors

peferron avatar

Watchers

 avatar

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.