LeetCode solutions runner
Project description
Overview
⚠️ Work in progress
LeetCode solutions runner
This project was generated with cookiecutter using jacebrowning/template-python.
Setup
Requirements
- Python 3.9+
Installation
Install it directly into an activated virtual environment:
$ pip install leetcode_runner
or add it to your Poetry project:
$ poetry add leetcode_runner
Usage
After installation, the package can imported:
from leetcode_runner import LeetCode
from typing import *
# Copied as is from the LeetCode
problem = """
Example 1:
Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Output: Because nums[0] + nums[1] == 9, we return [0, 1].
Example 2:
Input: nums = [3,2,4], target = 6
Output: [1,2]
Example 3:
Input: nums = [3,3], target = 6
Output: [0,1]
"""
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
return []
LeetCode(problem, Solution).check()
Will print:
----------
[ FAILED ]
nums = [2,7,11,15], target = 9
Expected: [0, 1]
Actual : []
----------
[ FAILED ]
nums = [3,2,4], target = 6
Expected: [1, 2]
Actual : []
----------
[ FAILED ]
nums = [3,3], target = 6
Expected: [0, 1]
Actual : []
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
leetcode-runner-0.0.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for leetcode_runner-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 515e43203ce6ea1b4dccc9fb46285c0968f72aec3523d15fd79fba32cca55bbb |
|
MD5 | a385eee2c11bb92d1c021db805ab8c40 |
|
BLAKE2b-256 | afe61a493e17f4aebe7688e39a4142cb475b047df04348ce00789f73a03c634a |