mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-15 09:01:18 +00:00
update cc problem paths
This commit is contained in:
parent
7d711afd68
commit
ecf63dcff3
4 changed files with 30 additions and 9 deletions
|
|
@ -11,9 +11,15 @@ Add additional test cases to an existing problem to make it more challenging or
|
|||
## Problem
|
||||
Problem name: $ARGUMENTS (if empty, ask which problem)
|
||||
|
||||
## Find the problem
|
||||
First, find the veetcode problems directory:
|
||||
```bash
|
||||
VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems")
|
||||
```
|
||||
|
||||
## Process
|
||||
|
||||
1. Read the existing solution.py and tests.py for the problem
|
||||
1. Read the existing solution.py and tests.py from $VEET_DIR/*/{problem-name}/
|
||||
2. Analyze what edge cases are NOT covered
|
||||
3. Ask the user what kind of tests they want:
|
||||
- Edge cases (empty, single element, boundaries)
|
||||
|
|
|
|||
|
|
@ -10,9 +10,15 @@ After the user has solved a problem (or given up), explain the optimal solution
|
|||
## Problem
|
||||
Problem name: $ARGUMENTS (if empty, ask which problem)
|
||||
|
||||
## Find the problem
|
||||
First, find the veetcode problems directory:
|
||||
```bash
|
||||
VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems")
|
||||
```
|
||||
|
||||
## Process
|
||||
|
||||
1. Read their solution.py to see their implementation
|
||||
1. Read their solution.py from $VEET_DIR/*/{problem-name}/ to see their implementation
|
||||
2. Provide explanation covering:
|
||||
|
||||
### For a CORRECT solution:
|
||||
|
|
|
|||
|
|
@ -31,10 +31,14 @@ Before writing any files, mentally design:
|
|||
- Edge cases
|
||||
|
||||
### Step 3: Create Directory
|
||||
First, find the veetcode problems directory:
|
||||
```bash
|
||||
mkdir -p problems/{difficulty}/{problem-name}
|
||||
VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems")
|
||||
mkdir -p "$VEET_DIR/{difficulty}/{problem-name}"
|
||||
```
|
||||
|
||||
All file operations should use `$VEET_DIR/{difficulty}/{problem-name}/` as the base path.
|
||||
|
||||
### Step 4: Write solution.py (SKELETON ONLY)
|
||||
Write ONLY the skeleton - never include the solution!
|
||||
|
||||
|
|
@ -119,7 +123,7 @@ class TestEdgeCases:
|
|||
You MUST verify the tests are solvable before telling the user. Run this verification using inline Python - DO NOT write the solution to any file:
|
||||
|
||||
```bash
|
||||
cd problems/{difficulty}/{problem-name} && python -c "
|
||||
cd "$VEET_DIR/{difficulty}/{problem-name}" && python -c "
|
||||
import sys
|
||||
from types import ModuleType
|
||||
|
||||
|
|
@ -155,9 +159,9 @@ Only after verification passes, tell the user:
|
|||
```
|
||||
✅ Problem created and verified!
|
||||
|
||||
📁 Location: problems/{difficulty}/{problem-name}/
|
||||
📝 Edit: solution.py
|
||||
🚀 Run: uv run veetcode → select "{problem-name}"
|
||||
📁 Location: $VEET_DIR/{difficulty}/{problem-name}/
|
||||
📝 Open: veet open {problem-name}
|
||||
🚀 Run: veet → select "{problem-name}"
|
||||
|
||||
Good luck!
|
||||
```
|
||||
|
|
|
|||
|
|
@ -38,5 +38,10 @@ Problem name: $ARGUMENTS (if empty, ask which problem they need help with)
|
|||
- Ask if they want more specific hints after each level
|
||||
- Encourage them to try implementing after each hint
|
||||
|
||||
## Read the problem first
|
||||
Read: problems/*/$ARGUMENTS/solution.py (find the matching problem directory)
|
||||
## Find the problem
|
||||
First, find the veetcode problems directory:
|
||||
```bash
|
||||
VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems")
|
||||
```
|
||||
|
||||
Then read: $VEET_DIR/*/$ARGUMENTS/solution.py (find the matching problem directory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue