Anthropic Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Convert stack samples to trace events
Question Implement convertToTrace(samples) that, given a chronologically ordered vector of stack samples (each sample contains a timestamp and a call-...
Implement thread-safe blocking queue
Question Design and implement a thread-safe bounded blocking queue that supports concurrent enqueue and dequeue operations using standard synchronizat...
Explain career goals and cultural alignment
Behavioral: Long‑Term Goals and Mission Alignment (Software Engineer, Onsite) Prompt You are interviewing onsite for a Software Engineer role. Address...
Design an LLM-based binary classifier
Design a Binary Text Classifier Using Only a Log-Probability Scoring Helper Context You are building a binary text classifier without fine-tuning. You...
Solve programming task with follow-ups
Question Pure programming problem solving: implement the core algorithmic solution, then extend it to ( 1) support a constraint of consecutive N eleme...
Optimize HTTP requests for speed and limits
You are building a service that needs to send HTTP requests to a large number of URLs (for example, a simple web crawler or data fetcher). The naive i...
Discuss culture and collaboration
Behavioral & Leadership: Team Culture, Feedback, Ambiguity, and Disagree-and-Commit Context: You are interviewing for a Software Engineer role during ...
Implement a recency-eviction bounded cache
Implement an in-memory key–value store with a fixed capacity N that uses recency-based eviction. Support: get(key) -> value or -1 if missing, and put(...
Design a low-latency ML inference API
System Design: Low‑Latency ML Inference API (Real‑Time) Context You are designing an in‑region, synchronous inference API used by product surfaces (e....
Implement hostname-restricted web crawler
Implement a single-threaded web crawler that, given a starting URL startUrl and an interface getUrls(url) that returns all hyperlinks on the page at u...
Explain management style, execution strategy, and culture choices
Behavioral & Leadership: ML Engineering Onsite Context You are interviewing for a Machine Learning Engineer role with significant leadership responsib...
Design a scalable, reliable system
System Design: Global Photo/Video File Storage and Sharing ("CloudDrive") Context Design a scalable, highly reliable consumer service where users uplo...
Discuss career decisions and culture fit
Behavioral and Leadership Technical Screen — Software Engineer Context You’ll be assessed on how you make and communicate decisions, collaborate acros...
Simulate stack traces from logs
Given a list of log entries describing function calls, each formatted as "<id> <event> <timestamp>" where event ∈ {START, END} and timestamps are inte...
Design an in-memory banking service
Design an in-memory banking service supporting timestamped operations and edge-case semantics. Implement: ( 1) create_account(id, t): Create a new acc...
Walk through a recent technical project
Project Deep-Dive (Onsite Behavioral + Technical) Context: Choose a recent technical project (ideally within the last 12–18 months) where you led or h...
Design a scalable network I/O service
System Design: High-Volume Network I/O Backend (Files and Streaming) Context Design a backend service that supports millions of users uploading and do...
Convert stack samples to execution trace
You are given sampling-profiler output: a list of Sample objects ordered by timestamp ascending. Each Sample has (t: float, stack: list[str]) where st...
Design a desktop AI chat frontend
Design a Frontend Architecture for a Cross-Platform Desktop Conversational AI App Context You are designing the frontend architecture for a cross-plat...
Scale crawler with thread pool
Concurrent Web Crawler — Bounded Thread Pool, Thread-Safe Frontier, Dedupe, Politeness, and Trade-offs You are refactoring an existing single-threaded...