EliteCode
Strategically Shuffling Leetcode Questions to Optimize DS&A Study Time
Installation Instructions
Elitecode can be installed from source or from Python's pip package manager:
$ pip install elitecode
To finalize the installation, simply run elitecode with elevated permissions:
$ elitecode
Problems file missing - Please login with Leetcode account to generate personalized problems file:
Username:
Password:
What is the point of this program?
My interview preparation strategy involves doing 2 new Leetcode questions each day, and going back and re-solving an old question that was completed during a previous session.
It's really easy to hit this 2 question target by picking questions that can be solved in a very similar way. For instance:
To prevent this, I typically use the shuffle feature on Leetcode to pick random questions, but sometimes there will be 2 difficult questions in a row that are categorized as "Hard" and can take an hour or more to solve.
This program strategically shuffles Leetcode questions in a way that optimizes interview preparation/DS&A study time.
What does "Strategically Shuffling Leetcode Questions" mean?
Leetcode has a "Shuffle" feature, but it simply generates a random question of any difficulty level. EliteCode will generate a random question while taking into account specified difficulty weights.
For instance:
elitecode --easy 5 --medium 3 --hard 1
Will generate random unsolved questions that most likely fall under easy or medium difficulty, with a small chance of the question being categorized as hard.
Meanwhile,
elitecode --easy 1 --medium 5 --hard 1
Will generate unsolved questions that most likely fall under the medium difficulty, with a small chance of the question being categorized as easy or hard.
elitecode --easy 5 --medium 0 --hard 0
Will only generate unsolved Leetcode questions that are categorized as easy.
The program has default weights that are used if no command line arguments are passed:
{'medium': 30, 'hard': 10, 'easy': 60}
How do you access my Leetcode question history?
EliteCode sends an authenticated request to the following API endpoint on Leetcode:
https://leetcode.com/api/problems/all/
This endpoint contains all problem descriptions and your personal Leetcode solution history. It saves the data locally, and filters out questions that can only be accessed with a Leetcode premium account.
How do I change the number of questions returned?
Simply use the "old" or "new" command line argument to specify the number of questions generated. For example:
elitecode --easy 5 --medium 0 --hard 0 --new 10
How do I regenerate my Leetcode problem list to reflect new questions?
elitecode --regenerate