A python package with tools to let you try coding problems and check your code against your own test cases.
Project description
Overview
A python package with tools to let you try coding problems and check your code against your own test cases.
Sites like LeetCode and Project Euler have great problems you can solve to improve your data-structures and algorithm knowledge.
But LeetCode's IDE isn't fun to code in, and harder to debug in.
Project Euler has no web IDE at all.
This tool allows you to quickly start solving those problems and add test-cases quickly.
Installation
Install using pip:
$ pip install leetcode-local-runner
or with Poetry:
$ poetry add leetcode-local-runner
Usage
- Install the library.
- Pick a problem to solve from either LeetCode or Project Euler.
- Copy the code in the editor into a python file.
class Solution: def dailyTemperatures(self, temperatures: List[int]) -> List[int]: pass
- Create your own test-cases and pass them into the LeetCode class like so:
test_cases = [
{"temperatures": [73, 74, 75, 71, 69, 72, 76, 73]},
{"temperatures": [30, 40, 50, 60]},
{"temperatures": [30, 60, 90]},
]
expected_outputs = [
[1, 1, 4, 2, 1, 1, 0, 0],
[1, 1, 1, 0],
[1, 1, 0],
]
lc = LeetCode(test_cases=test_cases, expected_outputs=expected_outputs, fn=Solution().isSameTree)
lc.run_test_cases()
Requirements
- Python >= 3.10
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leetcode_local_runner-0.0.1.tar.gz.
File metadata
- Download URL: leetcode_local_runner-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a925063d1dc62237c3b8089377089e9d283d17b4db5dd75db3185abfbd1a697
|
|
| MD5 |
3bf7383db8f9e8b87b16f4031362de17
|
|
| BLAKE2b-256 |
be0c8a207ab5abf2269e8b2fbe4f3d3b8ae2ff15ba512bad58d0957258cf0fa2
|
Provenance
The following attestation bundles were made for leetcode_local_runner-0.0.1.tar.gz:
Publisher:
publish.yml on shenoy-anurag/leetcode-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leetcode_local_runner-0.0.1.tar.gz -
Subject digest:
2a925063d1dc62237c3b8089377089e9d283d17b4db5dd75db3185abfbd1a697 - Sigstore transparency entry: 168163556
- Sigstore integration time:
-
Permalink:
shenoy-anurag/leetcode-runner@b6d7c7034f5029fd687a9557f2a04694fdba3620 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/shenoy-anurag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b6d7c7034f5029fd687a9557f2a04694fdba3620 -
Trigger Event:
release
-
Statement type:
File details
Details for the file leetcode_local_runner-0.0.1-py3-none-any.whl.
File metadata
- Download URL: leetcode_local_runner-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d1e84cb0d34adf2737754309c029367a5f1be288bf452ecc01d630e7a3c7e4e
|
|
| MD5 |
9179ad356b3cf56d2df80399ea9996a4
|
|
| BLAKE2b-256 |
4404ccf003239e91b202316ef211372e1765eca362c426525dd8e0b2fd779ae8
|
Provenance
The following attestation bundles were made for leetcode_local_runner-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on shenoy-anurag/leetcode-runner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leetcode_local_runner-0.0.1-py3-none-any.whl -
Subject digest:
3d1e84cb0d34adf2737754309c029367a5f1be288bf452ecc01d630e7a3c7e4e - Sigstore transparency entry: 168163561
- Sigstore integration time:
-
Permalink:
shenoy-anurag/leetcode-runner@b6d7c7034f5029fd687a9557f2a04694fdba3620 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/shenoy-anurag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b6d7c7034f5029fd687a9557f2a04694fdba3620 -
Trigger Event:
release
-
Statement type: