Here is where I store all my solutions for various questions in Leetcode.
The repository will have folders, each based on the programming language used to solve the LeetCode question.
The files within the folders will be named q-#### to describe the question number they are listed on LeetCode.com. (Example: q-0013 would be question number 13)
The file will begin with a comment segment of the Question and the test cases provided. I will also provide a link to associated Leetcode question so others can see the full question including pictures, diagrams and other testcases.
After, the solution code, typically a function, will be posted along with a test case to prove correctness.
Then, the code explination and time/space complexities will be written below the code as a comment.