You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add company-specific problem practice functionality
Introduced "Company Mode" to handle questions based on specific companies and their recent trends. This includes company-based filters, durations, topics, and difficulties with caching support and validation to enhance user experience and efficiency.
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Squidleet is a command-line LeetCode practice game that allows you to solve Leet
15
15
-**Daily Challenge Integration**: Fetch and solve the LeetCode Daily Coding Challenge directly from the terminal.
16
16
-**Study Plan Mode**: Fetch random problems based on a specific study plan.
17
17
-**Random Problem Practice**: Get a randomly selected LeetCode problem to practice.
18
+
-**Company Mode**: Fetch random problems asked by a specific company over a given duration (e.g., last 30 days).
18
19
-**Specific Problem Mode**: Solve a specific problem by providing its problem slug.
19
20
-**Problem Fetching**: Added enhanced fetching capabilities, including filtering based on difficulty (e.g., `easy`, `medium`, `hard`) and more.
20
21
-**Submit Solutions**: Users can now directly submit their solutions to LeetCode from the terminal via a `submit_solution` function.
@@ -151,6 +152,36 @@ Selected 🎯 Study Plan Mode: top-interview-150
151
152
⏳ You have 45 min minutes to solve the problem. Good luck!
152
153
```
153
154
155
+
### Company Mode
156
+
157
+
Company Mode allows you to fetch random problems asked by a specific company.
158
+
159
+
⚠️ **Note**: This mode requires the `--leetcode-session` argument to be set with a valid LeetCode session cookie. This is because the company-specific problem data is not available publicly and requires a valid [LeetCode Premium](https://leetcode.com/subscribe) subscription.
160
+
161
+
```bash
162
+
python3 main.py --mode company --company-name microsoft --duration thirty-days
163
+
```
164
+
165
+
Optional arguments:
166
+
-`--open-in-browser`: Opens the problem in a browser window.
167
+
-`--editor`: Specify the preferred code editor (e.g., `vim`, `nano`). Default is the system-configured default editor.
168
+
-`--difficulty`: Choose between `easy`, `medium`, or `hard` or select multiple using comma-separated list (e.g., `easy,medium`).
169
+
-`--tags`: Filter problems based on tags. Example usage: `--tags Array,Hash Table`.
170
+
-`--duration`: Fetch the problems asked by the company over a given span of time. Valid values: `thirty-days`, `three-months`, `six-months`, `more-than-six-months`, or `all`. Default is `all`.
171
+
172
+
```text
173
+
Welcome to 🦑 SquidLeet!
174
+
🔐 Using authenticated session
175
+
Selected 👔 Company Mode: Top Questions asked at Microsoft in the last 30 days
176
+
🎯 Problem Selected: Maximum Length of a Concatenated String with Unique Characters
🏷️ Tags: Array, String, Backtracking, Bit Manipulation
180
+
📈 Acceptance Rate: 54.2%
181
+
...
182
+
⏳ You have 45 min minutes to solve the problem. Good luck!
183
+
```
184
+
154
185
## Configurations
155
186
Squidleet uses a `LEETCODE_SESSION` cookie for authentication. Setting the `LEETCODE_SESSION` environment variable is necessary for all operations, including fetching and submitting problems.
0 commit comments