https://github.com/paulcadman/lean4-leetcode
https://github.com/paulcadman/lean4-leetcode
lean4 leetcode
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulcadman/lean4-leetcode
- Owner: paulcadman
- Created: 2023-08-25T14:02:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T08:46:41.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T17:05:23.430Z (4 months ago)
- Topics: lean4, leetcode
- Language: Lean
- Homepage:
- Size: 4.88 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leetcode exercises in Lean4
## Run all the exercises
```
lake exe leetcode
```## Run a single exercise
```
lake exe
```where `name` is given in the following table:
| Exercise | Implementation | Test name | Bench name |
| -------- | -------------- | --------- | ---------- |
| [twoSum](https://leetcode.com/problems/two-sum/) | [TwoSum.lean](./Leetcode/TwoSum.lean) | `twosum-test` | `twosum-bench` |
| [reverse](https://leetcode.com/problems/reverse-integer/) | [Reverse.lean](./Leetcode/Reverse.lean) | `reverse-test` | |## Credits
This code was written with [@awalterschulze](https://github.com/awalterschulze) on his [twitch channel](https://www.twitch.tv/videos/1907381658).
The recording of us tackling the initial problems can be found on [youtube](https://www.youtube.com/watch?v=uLvOPhZQ5f4).