Writing Algorithm challenges is a great way to exercise your own problem solving and testing abilities. It is a simple three step process.
Name your challenge
Attempt to rate difficulty compared against existing Algorithm challenges.
TODO: add basic quantifiers for each difficulty level
Separate paragraphs with a line break. Only the first paragraph is visible prior to a user clicking the “More information” button.
All necessary information must be included in the first paragraph. Write this first paragraph as succinct as possible. Subsequent paragraphs should offer hints or details if needed.
If your subject matter warrants deeper understanding, you may link to Wikipedia.
This is important.
Leave this field blank. It will soon be removed from the generator.
These tests are what bring your challenge to life. Without them, we cannot confirm the accuracy of a user’s submitted answer. Choose your tests wisely.
Algorithm tests are written using the Chai.js assertion library. Please use the
expect syntax for end user readability. As an example of what not do to, many of the original Algorithm challenges are written with
assert syntax and many of the test cases are difficult to read.
If your Algorithm question has a lot of edge cases, you will need to write many tests for full coverage. If you find yourself writing more tests than you desire, you may consider simplifying the requirements of your Algorithm challenge. For difficulty level 1 through 3, you will generally only need 2 to 4 tests.
If you found this page useful, you can give thanks by copying and pasting this on the main chat:
Thanks @brandenbyers @Rafase282 for your help with the Algorithm Style Guide
NOTE: Please add your username only if you have added any relevant main contents to the wiki page. (Please don’t remove any existing usernames.)