Anthropic Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
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...
Optimize a core kernel for throughput
You are given a mocked “core kernel” function (similar in spirit to a GPU kernel / tight compute loop) that is functionally correct but slow. Task - O...
Estimate VRAM and compare model parallelism
You are reasoning about GPU memory and parallelism for a transformer-like workload dominated by matrix multiplications. Part 1: Can one matmul’s tenso...
Implement staircase printing and distributed mode/median
Problem A: Print a “staircase” pattern Implement a function that prints a staircase with n rows. Input - An integer n (n >= 1) Output - Print n lines....
Explain projects and handle AI-safety conflicts
Behavioral / Hiring Manager round 1. Walk through 1–2 key projects from your resume. - What was the goal and why did it matter? - What was your ...
How would you scale batch image pipelines?
Design a system to process m input images with n pipelines, producing m×n outputs. - Pipelines are sequences of image operations (resize/rotate/filter...
Generate outputs for images and pipelines
You are given m input images and n processing pipelines. - Each pipeline is an ordered list of k operations (e.g., resize, rotate, crop, blur, color t...
Design a single- and multi-threaded web crawler
Web Crawler (single-threaded, then multi-threaded) You are given: - A starting URL startUrl (e.g., "http://news.example.com/a/index.html"). - An inter...
Find duplicate files and apply image operations
Part A — Find duplicate files by content You are given a list of directory records. Each record is a string describing a directory path followed by on...
Describe failure impact and resolve cross-functional conflict
You are in a behavioral interview. Answer the following prompts using a structured method (e.g., STAR or CARL). Provide specific details, metrics wher...
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...
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...
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 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...
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(...