Skip to content

Latest commit

 

History

History
49 lines (27 loc) · 4.36 KB

README.md

File metadata and controls

49 lines (27 loc) · 4.36 KB

The Algorithms - JavaScript Playground

This project provides a client-side code playground to allow editing, running and testing code for Data Structures and Algorithms from the great repo: The Algorithms - JavaScript. These currently include more that 350 implementations in JavaScript.

Open the Playground 🚀

The project is built using LiveCodes, the feature-rich, open-source, client-side code playground that supports 80+ languages/frameworks. Code and tests are imported form The Algorithms - JavaScript repo and are added to the playground using LiveCodes SDK. Tests run locally in the browser using LiveCodes test runner (which uses Jest). The playground is deployed to GitHub Pages using the LiveCodes deploy feature!

Source Code

The source code can be found in the gh-pages branch (Edit in LiveCodes ✏️).

How is that different from the official playground?

This project has the following major differences:

  • The code runs in the browser (instead of sending code to the server), so it does not need a backend to maintain and pay for.
  • It allows running tests and reviewing test results (which is not currently supported in the official playground for JavaScript).
  • Mobile support: LiveCodes has a responsive layout and uses the mobile-friendly code editor CodeMirror6 on mobile.
  • Any algorithm can be opened in the full LiveCodes app (by clicking the LiveCodes logo on the upper right corner). This allows using all LiveCodes features (including the ability to: save, share, export, deploy, sync and broadcast code, ...etc).

Can I have a direct link to a specific algorithm?

Yes!

When a new algorithm is selected from the dropdown menu, the URL querystring parameter algorithm is changed to the selected one. This URL can be shared and the selected algorithm will be loaded by default. e.g. https://hatemhosny.github.io/thealgorithms-javascript/?algorithm=Recursive/Factorial

What IDE did you use to build this project?

LiveCodes of course :)

License

The project imports code and tests from The Algorithms - JavaScript repo which has GPL-3.0 license, so this project is licensed under the same license.

However, please note that LiveCodes and its SDK are licensed under MIT license. So if you remove all references to The Algorithms - JavaScript repo and its code, you may consider the rest of the code (utilizing the LiveCodes SDK) as having MIT license.

Contributions/Suggestions

Very welcome :)

How can I build similar projects?

Go ahead to LiveCodes. You may want to check the docs on embedding playgrounds and LiveCodes SDK.

The LiveCodes documentations are comprehensive with code samples, live demos and screenshots.

LiveCodes app and SDK are licensed under MIT license.