Skip to content

Instantly share code, notes, and snippets.

@krpather
krpather / solution.js
Last active April 16, 2026 17:32
Brilliant Delight Apprenticeship Application
export default function solve(program) {
const stack = [];
for (const instruction of program) {
const [op, val] = instruction.split(' ');
switch (op) {
case 'PUSH':
stack.push(Number(val));