What this prompt does
This prompt turns your AI assistant into a structured coding interview coach that withholds the answer until you've earned it. The template enforces a strict sequence: problem presentation first, your attempt second, evaluation third — mirroring the real interview loop. That constraint is the key mechanism; an AI that hands you solutions immediately trains recognition, not problem-solving.
Once you submit, the coach runs a four-axis evaluation against correctness, time complexity, space complexity, and readability. It names the underlying algorithmic pattern only after you reach an optimal solution, which builds the mental model you actually need to generalize across problems — not just memorize one answer. The final hiring-tier rating gives you calibrated, company-specific signal rather than vague encouragement.
When to use it
- You have a big-tech interview loop scheduled in two weeks and need deliberate practice with company-specific difficulty calibration.
- You solved a LeetCode problem but want to know whether your approach would actually pass — and why or why not.
- You keep getting "your solution works but can you optimize it?" in interviews and need to drill that exact feedback loop.
- You want to identify which algorithmic patterns you're weakest on (sliding window, monotonic stack, union-find) and build targeted reps.
- You're switching from one language to another and need to verify your idiomatic style reads well to interviewers.
Example output
Problem (Medium | Trees | Google):
Given the root of a binary tree, return the level-order traversal
of its node values. (i.e., from left to right, level by level.)
Example:
Input: root = [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]
Constraints:
- Number of nodes: [0, 2000]
- -1000 <= Node.val <= 1000
Submit your solution in Python when ready. Do not scroll down.
After submission, the coach returns Big O analysis, flags unhandled edge cases (empty tree, single node), and — once you hit BFS with a deque — labels it "BFS / level-order traversal" and lists similar problems: Binary Tree Right Side View, Zigzag Level Order Traversal, Populating Next Right Pointers.
Pro tips
- Set
[difficulty]to one level above your comfort zone, not two. The coach's hints are calibrated for near-optimal attempts, not complete cold starts. - Use
[target_company]literally — "Google", "Stripe", "Shopify" — because it shifts the evaluation rubric. A Stripe interview weights clean, production-style code differently than a pure algorithmic big-tech screen. - After you receive the hiring-tier rating, immediately re-prompt: "What would a Strong Hire solution look like for this problem?" — the template doesn't reveal this until you ask.
- Set
[similar_count]to 3, not more. Five problems sounds comprehensive; three you'll actually do before your interview. - Pair this with your real interview notes. Paste in a problem you were given last week and set
[difficulty]to match — the coach will evaluate your remembered solution against the actual constraints you faced.