Code RoomExport to PDF service
MediumPrep Room Coding #4267

Export to PDF service

Vibe & agenticAlgorithms & data structuresMid–Senior~24 min

You're building an export-to-PDF service in Node/TypeScript with an AI agent: users export reports (tables, charts, page breaks) to a downloadable PDF, generated server-side and potentially large/concurrent. Describe the build plan: library choice (headless-Chromium vs. a PDF DSL like PDFKit vs. wkhtmltopdf), how you sequence it, the resource/concurrency controls, and acceptance criteria. What does a careless 'generate a PDF from this HTML' prompt get wrong in production?

Implement
admit_render_requests(arrive_ms: list[int], cost_ms: list[int], pool_size: int, timeout_ms: int) → list[str]
Examples
in[[0,0,0],[100,100,100],2,1000]out["done@100","done@100","done@200"]
in[[0,0],[50,9000],1,2000]out["done@50","timeout@2050"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 24 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.