8dd5fcbeb7ae1d2bfaa3884552239cb83b104c5f
under construction
Like LeetCode
but more lightweight
run the bash script to start the server.
if you want to contribute write tests like this:
FileStructure:
In /problems/ create a folder named after the problem.
In this folder create manifest.json, test.py, description.md
Manifest.JSON needs to exsist and needs to look like this:
{
"title": "Title of the Problem",
"description": "Write a very short description here",
"description_md": "problems/problempath/description.md",
"difficulty": "easy || medium || hard",
"test_code": "problems/problempath/test.py"
}
I do know it might be a bit tedious but this is required and its the easiest way.
After you've decided on how you would name / write your Test write it like this:
- It is important to note that you CAN write the Code the User is expected to write firstly. BUT after writing the UnitTest and it passing, comment out the written code.
It is supposed to look something like this (/sortlist/):
"""
@TESTSAMPLE.PY / NAME THIS "test.py" in your actual project
"""
import unittest
" )) First Point from the List "
# def sortlist(lst = [4,3,2,1]) -> list:
# return sorted(lst)
")) This is a 'easy' Test, if you want you can write more defined ones."
class TestSolution(unittest.TestCase):
def test_sort(self):
self.x = []
self.assertEqual(sortlist(self.x), sorted(self.x)) # pyright: ignore[reportUndefinedVariable] <- This is only here so that pyright doesnt complain ; NOT NECCESARY!
if __name__ == "__main__":
unittest.main()
Writing the description:
Please by God write simple and easy to understand terms. If you write like Einstein noone is going to understand you.
Description
Languages
Python
64.1%
JavaScript
18.1%
HTML
9.3%
Markdown
8.1%
Shell
0.3%