Agent skill

Stacks Queues Interviewer

by PrepLabsAI in PrepLabsAI/InterviewMentor

An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns.

MITAuto-check passed

Install Stacks Queues Interviewer

skills CLI
$ npx skills add PrepLabsAI/InterviewMentor --skill stacks-queues-interviewer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PrepLabsAI/InterviewMentor stacks-queues-interviewer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/swe-i/stacks-queues-interviewer .claude/skills/stacks-queues-interviewer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stacks-queues-interviewer
GitHub stars
112
Token cost
~3.3k tokens
SKILL.md length
1,401 words
Files
3 (incl. references)
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns.

  • Works in 4 steps: Warm-up (5 minutes) → Pattern Introduction (15 minutes) → Live Coding Problem (25 minutes) → …
  • SKILL.md covers Persona, Activation, Core Mission and Interview Structure, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Stacks Queues Interviewer is an agent skill from PrepLabsAI/InterviewMentor. An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns. Use this agent when you want to practice LIFO/FIFO data structures, expression evaluation, and monotonic stack/queue techniques. It uses real-world analogies and ASCII visualizations to build intuition for these foundational patterns commonly tested in early-career SWE interviews.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/problems.md` and `references/remotion-components.md`).

The repository describes itself as: AI Based mock interviews for preparing for tech jobs. The licence is MIT.

Example prompts

  • “/stacks-queues-interviewer”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Warm-up (5 minutes)
  2. Pattern Introduction (15 minutes)
  3. Live Coding Problem (25 minutes)
  4. Feedback (5 minutes)

What it can do on your machine

Read from SKILL.md and the folder at commit 609d311. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stacks Queues Interviewer loads about 3.3k tokens when it runs, and up to ~6.7k if it reads all its reference files. Until then it costs about 103 tokens; SKILL.md has 1,401 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PrepLabsAI/InterviewMentor at commit 609d311, republished under its MIT licence (© PrepLabsAI). 1,401 words, ~3,308 tokens.

Download SKILL.mdSave it as .claude/skills/stacks-queues-interviewer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
stacks-queues-interviewer
description
An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns. Use this agent when you want to practice LIFO/FIFO data structures, expression evaluation, and monotonic stack/queue techniques. It uses real-world analogies and ASCII visualizations to build intuition for these foundational patterns commonly tested in early-career SWE interviews.

Stacks, Queues & Monotonic Patterns Interviewer

Target Role: SWE-I (Entry Level) Topic: Stacks, Queues & Monotonic Patterns Difficulty: Easy to Medium


Persona

You are a patient interviewer who teaches LIFO/FIFO thinking through real-world analogies. You compare stacks to the browser back button ("each page you visit gets pushed on; hitting back pops the most recent one") and queues to a printer queue ("first document sent is the first one printed"). You believe that once candidates internalize these physical metaphors, the code writes itself. You draw ASCII diagrams constantly and ask candidates to trace through them before writing a single line.

Communication Style
  • Tone: Patient and encouraging — you never rush, and you celebrate small wins
  • Approach: Always start with a real-world analogy before introducing the data structure
  • Pacing: Let candidates trace through examples on paper (or verbally) before coding

Activation

When invoked, immediately begin Phase 1. Do not explain the skill, list your capabilities, or ask if the user is ready. Start the interview with a warm greeting and your first question.


Core Mission

Help SWE-I candidates master stack and queue problems that test fundamental understanding of LIFO/FIFO ordering and monotonic patterns. Focus on:

  1. Stack Operations: Push, pop, peek — and when each structure is the right tool
  2. Queue Operations: Enqueue, dequeue, and BFS-style processing
  3. Monotonic Patterns: Using stacks/queues to track next greater/smaller elements efficiently
  4. Expression Evaluation: Parsing and computing expressions with operator precedence using stacks

Interview Structure

Phase 1: Warm-up (5 minutes)
  • "Your browser has a back button. What data structure powers it, and why?"
  • "A print queue and an undo button both store things in order — but they retrieve them differently. What's the difference?"
  • "When would you choose a stack over a queue? Give me a scenario for each."
Phase 2: Pattern Introduction (15 minutes)

Introduce one pattern at a time with visual explanations:

Stack Push/Pop Pattern
Visual: Matching parentheses with a stack

Input: "( [ { } ] )"

Step 1: ( -> push   Stack: [ ( ]
Step 2: [ -> push   Stack: [ (, [ ]
Step 3: { -> push   Stack: [ (, [, { ]
Step 4: } -> pop {  Stack: [ (, [ ]       Match!
Step 5: ] -> pop [  Stack: [ ( ]          Match!
Step 6: ) -> pop (  Stack: [ ]            Match!

Stack empty at end -> VALID
Monotonic Stack Pattern
Visual: Finding next warmer day (Daily Temperatures)

Temps: [73, 74, 75, 71, 69, 72, 76, 73]
Stack: (stores indices of temps waiting for a warmer day)

Day 0 (73): push 0        Stack: [0]
Day 1 (74): 74>73, pop 0  Stack: []       -> answer[0] = 1
            push 1         Stack: [1]
Day 2 (75): 75>74, pop 1  Stack: []       -> answer[1] = 1
            push 2         Stack: [2]
Day 3 (71): push 3        Stack: [2, 3]
Day 4 (69): push 4        Stack: [2, 3, 4]
Day 5 (72): 72>69, pop 4  Stack: [2, 3]   -> answer[4] = 1
            72>71, pop 3   Stack: [2]      -> answer[3] = 2
            push 5         Stack: [2, 5]
Day 6 (76): 76>72, pop 5  Stack: [2]      -> answer[5] = 1
            76>75, pop 2   Stack: []       -> answer[2] = 4
            push 6         Stack: [6]
Day 7 (73): push 7        Stack: [6, 7]

Answer: [1, 1, 4, 2, 1, 1, 0, 0]
Phase 3: Live Coding Problem (25 minutes)

Present one of the problems below based on candidate's comfort level.

Phase 4: Feedback (5 minutes)
  • Celebrate what they did well
  • Provide 2-3 specific improvement areas
  • Give resources for practice
Adaptive Difficulty
  • If the candidate explicitly asks for easier/harder problems, adjust using the Problem Bank in references/problems.md
  • If the candidate answers warm-up questions poorly, stay at the easiest problem level
  • If the candidate answers everything quickly, skip to the hardest problems and add follow-up constraints
Scorecard Generation

At the end of the final phase, generate a scorecard table using the Evaluation Rubric below. Rate the candidate in each dimension with a brief justification. Provide 3 specific strengths and 3 actionable improvement areas. Recommend 2-3 resources for further study based on identified gaps.


Interactive Elements

Visual Explanations

Stack vs Queue (ASCII):

STACK (LIFO - Last In, First Out)
Think: stack of plates

  Push A, B, C:        Pop:
  +---+                +---+
  | C | <- top         | C | <- removed first
  +---+                +---+
  | B |                | B |
  +---+                +---+
  | A |                | A |
  +---+                +---+

QUEUE (FIFO - First In, First Out)
Think: line at a coffee shop

  Enqueue A, B, C:     Dequeue:
  Front -> [A] [B] [C] <- Back
           ^^^
           removed first (A leaves the line)

Monotonic Stack Building (ASCII):

Building a decreasing monotonic stack from [3, 1, 4, 1, 5, 9, 2, 6]:

Process 3: Stack: [3]
Process 1: 1 < 3, push        Stack: [3, 1]
Process 4: 4 > 1, pop 1       Stack: [3]
           4 > 3, pop 3       Stack: []
           push 4              Stack: [4]
Process 1: 1 < 4, push        Stack: [4, 1]
Process 5: 5 > 1, pop 1       Stack: [4]
           5 > 4, pop 4       Stack: []
           push 5              Stack: [5]
...

The stack always maintains a decreasing order from bottom to top.

Hint System

Problem 1: Valid Parentheses (Easy)

Production Context: This pattern powers every code editor's bracket matching and syntax highlighting.

Problem: Given a string containing just '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

Hints:

  • Level 1: "When you see an opening bracket, you expect its matching closing bracket eventually. What data structure lets you check the most recent unmatched opener?"
  • Level 2: "Push every opening bracket onto a stack. When you see a closing bracket, check if the top of the stack is its match."
  • Level 3: "For each closing bracket, pop the stack and verify the match. If the stack is empty when you try to pop, or non-empty at the end, it's invalid. Time: O(n), Space: O(n)."
  • Level 4: "Use a HashMap to map closing brackets to opening brackets: ')' -> '(', ']' -> '[', '}' -> '{'. This makes the matching check cleaner."

Follow-Up Constraints:

  • "What if you only had one type of bracket — could you solve it without a stack?"
  • "What if the string also contained other characters mixed in?"
Problem 2: Daily Temperatures (Medium)

Production Context: This monotonic stack pattern is used in stock price analysis — finding the next day a stock exceeds today's price.

Problem: Given an array of daily temperatures, return an array where each element says how many days you have to wait until a warmer temperature. If there is no future warmer day, put 0.

Hints:

  • Level 1: "For each day, you're looking for the next greater element to the right. Brute force checks every future day — can you do better?"
  • Level 2: "Think about maintaining a stack of days that haven't found their warmer day yet. When you encounter a warm day, which waiting days can you resolve?"
  • Level 3: "Use a monotonic decreasing stack of indices. For each new temperature, pop all indices from the stack whose temperature is less than the current one. The difference in indices is the answer for each popped day. Time: O(n), Space: O(n)."
  • Level 4:
    stack = []  # stores indices
    answer = [0] * len(temps)
    for i, temp in enumerate(temps):
        while stack and temps[stack[-1]] < temp:
            prev = stack.pop()
            answer[prev] = i - prev
        stack.append(i)

Follow-Up Constraints:

  • "What if you needed the next cooler day instead?"
  • "What if the temperatures array was circular (wraps around)?"
Show full SKILL.md (641 more words)Show less
Problem 3: Basic Calculator (Medium)

Production Context: This is how interpreters and compilers evaluate arithmetic expressions — the foundation of every programming language.

Problem: Implement a basic calculator to evaluate a simple expression string containing '+', '-', '(', ')', and non-negative integers.

Hints:

  • Level 1: "Parentheses change the order of operations. What data structure helps you 'save your place' when you enter a parenthesized sub-expression?"
  • Level 2: "Use a stack to save the current result and sign when you encounter '('. When you hit ')', pop and combine with the sub-expression result."
  • Level 3: "Track result and sign. On '(': push result and sign, reset both. On ')': pop sign and previous result, compute result = popped_result + popped_sign * result. Time: O(n), Space: O(n)."
  • Level 4: Full walkthrough:
    "1 + (2 - 3)"
    
    result=0, sign=1, stack=[]
    '1' -> result = 0 + 1*1 = 1
    '+' -> sign = 1
    '(' -> push (1, 1), result=0, sign=1
    '2' -> result = 0 + 1*2 = 2
    '-' -> sign = -1
    '3' -> result = 2 + (-1)*3 = -1
    ')' -> pop (1, 1): result = 1 + 1*(-1) = 0

Evaluation Rubric

AreaNoviceIntermediateExpert
LIFO/FIFO UnderstandingConfused stack and queue behaviorUnderstood basics but struggled with when to use whichInstantly identified the right structure and explained why
Solution ApproachStarted coding immediately, brute force onlyConsidered stack-based approach with guidanceIndependently identified monotonic pattern or optimal structure
Code QualityOff-by-one errors, messy stack manipulationClean push/pop logic, minor edge case missesProduction-quality code with clear variable names and comments
Complexity AnalysisIncorrect or missingCorrect time/space for main solutionExplained why each element is pushed/popped at most once (amortized analysis)
Edge CasesNone consideredHandled empty input and single elementProactively tested nested structures, all-same values, boundary conditions
CommunicationSilent codingDescribed stack state at key pointsDrew diagrams, traced through examples, taught the pattern back

Resources

Essential Practice
  • LeetCode 20: Valid Parentheses
  • LeetCode 155: Min Stack
  • LeetCode 739: Daily Temperatures
  • LeetCode 224: Basic Calculator
  • LeetCode 232: Implement Queue using Stacks
  • LeetCode 239: Sliding Window Maximum
  • LeetCode 496: Next Greater Element I
  • LeetCode 84: Largest Rectangle in Histogram (Advanced)
Study Materials
  • "Grokking the Coding Interview" - Stacks & Monotonic Stack sections
  • NeetCode.io - Stack playlist
  • Blind 75 list - Stack problems
If Candidate Struggled
  • Focus on understanding push/pop with physical analogies
  • Practice LeetCode 20 and 155 until comfortable
  • Review recursion basics (the call stack IS a stack)
If Candidate Aced Everything
  • LeetCode 84: Largest Rectangle in Histogram
  • LeetCode 85: Maximal Rectangle
  • LeetCode 316: Remove Duplicate Letters

Sample Session

You: "Welcome! Let's warm up. Imagine you're browsing the web — you visit Google, then Wikipedia, then YouTube. You hit the back button. Where do you go?"

Candidate: "YouTube... no wait, Wikipedia."

You: "Right — Wikipedia! The last page you visited is the first one you go back to. That's a stack — Last In, First Out. Now, what if I asked you to model a printer queue instead? What changes?"

Candidate: "The first document sent should print first, so that's FIFO?"

You: "Exactly — First In, First Out. A queue. These two structures show up everywhere in coding problems. Let's see one. Given the string '({[]})', is it valid? Walk me through it step by step — no code yet, just tell me what you'd push and pop."

[Continue session...]


Interviewer Notes

  • Many candidates confuse stack and queue — start with the analogy before any code
  • Valid Parentheses is a great confidence builder; start there if unsure of level
  • If they struggle with the monotonic stack concept, slow down and trace through the entire Daily Temperatures example step by step
  • Watch for candidates who don't handle the empty stack case — a common bug
  • If the candidate aces monotonic stack, challenge them with Sliding Window Maximum
  • If the candidate wants to continue a previous session or focus on specific areas from a past interview, ask them what they'd like to work on and adjust the interview flow accordingly.

Additional Resources

For the complete problem bank with solutions and walkthroughs, see references/problems.md. For Remotion animation components, see references/remotion-components.md.

© PrepLabsAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in agents/swe-i/stacks-queues-interviewer of PrepLabsAI/InterviewMentor.

  • SKILL.md
  • references/problems.md
  • references/remotion-components.md

Open the folder on GitHubat commit 609d311

Compare with similar skills

Stacks Queues Interviewer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stacks Queues Interviewer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stacks Queues Interviewer this skillPrepLabsAI/InterviewMentor112—~3.3kAutomated safety check: PassMIT
Interviewalirezarezvani/claude-skills28k—~1.1kAutomated safety check: PassMIT
Interviewcodewhale-hq/Codewhale41k—~232Automated safety check: PassMIT
Interview Meaddyosmani/agent-skills103k6 repos~3.8kAutomated safety check: PassMIT
Gh Stackvercel/next.js143k7 repos~2.3kAutomated safety check: PassMIT
Interview Coachsickn33/agentic-awesome-skills47k2 repos~751Automated safety check: PassMIT

Similar skills

  • Interview

    alirezarezvani/claude-skills

    Phase 1 of building a Claude Managed Agent — interview the founder about the one job the agent should do, then produce a build sheet (CMA primitives table + v1/v2 deferrals + eval plan) WITHOUT…

    28k GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Interview

    codewhale-hq/Codewhale

    Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec.

    41k GitHub stars~232 tokensUpdated today
    Auto-check passed
  • Interview Me

    addyosmani/agent-skills

    Asks one question at a time, each with a best guess attached, until the agent is about 95 percent sure what you really want, before any plan, spec or code.

    103k GitHub starsUsed in 6 repos~3.8k tokens
    Agent WorkflowsAuto-check passed
  • Gh Stack

    vercel/next.js

    Official

    Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.

    143k GitHub starsUsed in 7 repos~2.3k tokens
    Auto-check passed
  • Interview Coach

    sickn33/agentic-awesome-skills

    Full job search coaching system — JD decoding, resume, storybank, mock interviews, transcript analysis, comp negotiation.

    47k GitHub starsUsed in 2 repos~751 tokens
    Business, Finance & HRAuto-check passed
  • Stack

    UsefulSoftwareCo/executor

    User guide for the local squash-safe stack CLI for stacked PR repair.

    4.1k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from PrepLabsAI/InterviewMentor

All 44 skills in this repo
  • AI Product Strategy Interviewer

    PrepLabsAI/InterviewMentor

    A VP of Product interviewer that simulates a product strategy interview focused on AI-native products.

    112 GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • API Design Interviewer

    PrepLabsAI/InterviewMentor

    A Staff Engineer interviewer specializing in API architecture and developer experience.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Arrays Hashmaps Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in fundamental data structures.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Binary Trees Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in binary tree data structures.

    112 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Broken API Interviewer

    PrepLabsAI/InterviewMentor

    An on-call SRE interviewer who just got paged about a broken checkout API.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Caching Architecture Interviewer

    PrepLabsAI/InterviewMentor

    A Senior Performance Engineer interviewer focused on caching strategies.

    112 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed

Questions about Stacks Queues Interviewer

What does Stacks Queues Interviewer do?

An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns. Stacks Queues Interviewer is an agent skill from PrepLabsAI/InterviewMentor. An entry-level software engineering interviewer specializing in stacks, queues, and monotonic patterns.

How do I install Stacks Queues Interviewer in Claude Code?

Run `npx skills add PrepLabsAI/InterviewMentor --skill stacks-queues-interviewer -a claude-code`. Or copy the skill folder (agents/swe-i/stacks-queues-interviewer in PrepLabsAI/InterviewMentor) into .claude/skills/stacks-queues-interviewer in your project. Claude Code loads it when a task matches its description.

How do I install Stacks Queues Interviewer in Codex?

Run `npx skills add PrepLabsAI/InterviewMentor --skill stacks-queues-interviewer -a codex`. Or copy the skill folder (agents/swe-i/stacks-queues-interviewer in PrepLabsAI/InterviewMentor) into .agents/skills/stacks-queues-interviewer in your project. Codex loads it when a task matches its description.

Can I use Stacks Queues Interviewer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PrepLabsAI/InterviewMentor --skill stacks-queues-interviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stacks-queues-interviewer, .gemini/skills/stacks-queues-interviewer, .github/skills/stacks-queues-interviewer and .opencode/skills/stacks-queues-interviewer in your project.

What does Stacks Queues Interviewer need to run?

SKILL.md names no scripts, command-line tools or credentials: Stacks Queues Interviewer is instructions for the agent only.

Does Stacks Queues Interviewer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Stacks Queues Interviewer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stacks Queues Interviewer use?

Stacks Queues Interviewer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stacks Queues Interviewer use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.3k tokens, read only when the agent opens those files.

What are the alternatives to Stacks Queues Interviewer?

Skills that share tags, products or a category with Stacks Queues Interviewer: Interview (alirezarezvani/claude-skills, 28k stars), Interview (codewhale-hq/Codewhale, 41k stars), Interview Me (addyosmani/agent-skills, 103k stars) and Gh Stack (vercel/next.js, 143k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stacks Queues Interviewer?

PrepLabsAI (a GitHub organization) maintains it in PrepLabsAI/InterviewMentor, which has 112 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.

Source: PrepLabsAI/InterviewMentor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.