cswork / libraryOpen practice workspace

Interview experiences · Retell

Retell Software Engineer Interview Experience — Coding a Stack Interpreter in Vim Without AI

RejectedTech screenInterviewed 2026-08

A startup that works on voice AI. The first interview was handwritten Python. I used my own IDE and environment, and any AI or AI suggestion was prohibited. At the time, I did not know how to turn off AI inline suggestions in VS Code, so I had no choice but to write everything in Vim. Problem description The problem was to process a string containing numbers and operators. It included +, -, , /,…

A startup that works on voice AI.

The first interview was handwritten Python. I used my own IDE and environment, and any AI or AI suggestion was prohibited. At the time, I did not know how to turn off AI inline suggestions in VS Code, so I had no choice but to write everything in Vim.

Problem description

The problem was to process a string containing numbers and operators. It included +, -, *, /, swap, dup (duplicate), pop, and drop.

OperatorBehaviorBoundary condition
popRemove and pop the element at i=0The container must have at least one element; an empty container raises an Underflow error.
dropRemove and pop the element at i=-1The container must have at least one element; an empty container raises an Underflow error.
dupCopy the element at i=0 and insert it at i=0The container must have at least one element; a capacity limit may cause an Overflow.
swapSwap the elements at i=0 and i=1The container must have at least two elements; fewer than two raises an error.
+, -, *, /Pop the elements at i=0 and i=1, calculate, and push the result at i=0At least two elements are required. Division also needs a check for a zero divisor.

Test cases

EXAMPLES: list[tuple[str, list[int]]] = [
    ('2 3 + .', [5]),
    ('5 dup * .', [25]),
    ('1 2 swap . .', [1, 2]),
    ('10 3 4 + - .', [3]),
    ('-5 3 + .', [-2]),
    ('1 . 2 . 3 . 4', [1, 2, 3]),
    ('99 2 3 + .', [5]),
    ('1 2 drop .', [1]),
    ('20 5 / .', [4]),
    ('30 3 / 4 - .', [6]),
]

I forgot to handle negative-number strings such as -5, and my program failed because of it. I have become so used to AI writing code that failing even a problem like this left me pretty speechless about myself.

Comments

Nothing here yet.

Join in on CSWork →