A command line utility to run LeetCode solutions written in Java.
- Install the Nix package manager.
- (optionally) Install direnv or nix-direnv
- Clone this repo and
cd
inside - Run either
direnv allow
if you installed direnv ornix develop
if you did not. - Run
leet --help
to access to the CLI
Lists the puzzles available to run.
❯ leet list
Output
Puzzle Features:
┌──────────────────────────┬─────────────────────────┬─────────────────────────┐
│Title │Description │Inputs │
├──────────────────────────┼─────────────────────────┼─────────────────────────┤
│Longest String Without │Given a string, find the │A string │
│Repeats │length of the longest │ │
│ │substring without │ │
│ │repeating characters. │ │
├──────────────────────────┼─────────────────────────┼─────────────────────────┤
│Longest Palindrome │Given a string, find the │A string │
│ │longest palindrome. │ │
└──────────────────────────┴─────────────────────────┴─────────────────────────┘
Run a specific puzzle. For example...
❯ leet puzzle longest_palindrome --inputs "bananas"
Output
Running puzzle: longest_palindrome
Results: anana