One question one file, name convention is [question no]-[short url].py
.
Take question 1 for example, URL is (https://leetcode.com/problems/two-sum/)[https://leetcode.com/problems/two-sum/], so name is 1-two-sum.py
.
Remember to write test cases in each file, name convention is test_xxx
, you can specify whatever name with xxx
.
Recommended steps to follow:
- Create new branch:
git checkout master -b [branch_name]
- Modify and submit your change.
- Checkout to
master
branch and rebase:git checkout master && git rebase master [branch_name]
- Resolve conflicts and push to remote:
git push --set-upstream origin [branch_name]
- Raise
Pull Request
on repository page from your branch to master and wait for approval.
Change directory to the root directory of this repo where you can find pytest.ini
in the same level and run following command:
pytest
You should find following output:
$ pytest
==================================== test session starts ====================================
platform win32 -- Python 3.5.2, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
rootdir: E:\py_proj\leetcode-solutions, inifile: pytest.ini
collected 1 item
python\1-two-sum.py . [100%]
================================= 1 passed in 0.04 seconds ==================================
- pytest
We can work on it continuously and communicate with each other in time.
Thoughts and hints are welcome as comment in code file.