Anthropic Software Engineer Onsite Coding Questions
46+ questions from real Anthropic Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.
What does the Anthropic Onsite Coding round test?
The Anthropic onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.
Top Topics in This Round
Anthropic Software Engineer Onsite Coding Questions
Anthropic Growth SDE Onsite Interview Experience and Preparation
Zhongchang 2YOE Investment Phone: tokenizer, I forgot a few follow ups, there was a previous interview that explained it more comprehensively prompt: For the coding interview, we will be doing coding
Anthropic Onsite SDE Interview Experience and Feedback
This post was last edited by Anonymous on 2025-09-30 13:40. I recently had an interview and am now giving back to the forum. The on-site interview involved duplicate files. Most of the questions on th
#636 Exclusive Time of Functions
LeetCode #636: Exclusive Time of Functions. Difficulty: Medium. Topics: Array, Stack. Asked at Anthropic in the last 6 months.
## Problem: In-Memory Database with Backup and Restore Build a toy core-logic, purely in-memory key-value database (no UI/framework), using only the standard library. You must process input commands
**Part A: SQL (basic)** Given a table `events` with: - `user_id` (string) - `event_time` (timestamp) - `event_type` (string) - `value` (numeric) Write SQL for (implement 1–2 as requested): 1. Daily
You are given a dataset (file or table). Using **Python**, perform an analysis and produce reproducible outputs (code + conclusions). The dataset relates to **cloud capacity management / optimization*
## Problem: Implement a UI From a Figma Mock Using React + TypeScript (Live Coding) You are given a **Figma mock** (a link or screenshots provided by the interviewer). Implement the UI using **React
Implement an LRU Cache (HashMap + Doubly Linked List) and Debug an Existing Implementation
## Problem: Implement and Debug an LRU Cache Implement a fixed-capacity **LRU (Least Recently Used) cache** supporting the following operations in **amortized O(1)** time: - `get(key)`: If `key` exi
Implement a Weighted Data Batcher with Deterministic Save/Resume (DataRegistry Iterator Interface)
## Problem: Implement a Weighted Data Batcher with Deterministic Save/Resume You are given an implemented `DataRegistry` (provided in the interview Colab) that can return an **iterator** for a datase
## Problem: Build an Image Processing Pipeline (Grayscale / Scale / Resize) and Optimize Performance You are given a set of input images and a list of image-processing `operations`. Implement a progr
## Problem: Detect Duplicate Files (group by size, then by content hash) You are given file metadata and a content-reading interface. Implement a tool to find duplicate files: - Two files are duplic
## Problem: Build a Web Crawler (single-thread first, then multi-thread) Given a starting URL `start_url`, implement a crawler that visits qualifying linked pages and returns the set (or list) of vis
## Problem: Implement a Web Crawler (single-threaded first, then concurrent) Given a starting URL `startUrl`, implement a crawler that fetches links from web pages. You are given an API `getUrls(url
## Problem: Debug an LRU Cache Implementation + Persistence After Crash (Follow-ups) You are given a Python implementation of an LRU cache (HashMap + doubly-linked list) intended to support: - `get(k
## Problem: Implement a Same-Domain Web Crawler (Sync + Async Follow-up) Given a starting URL `start_url`, implement a web crawler that recursively fetches pages and returns all page URLs that belong
## Question 2: Code & Design — Design and implement a Data Batcher Design a **data batcher** to organize samples into training batches and iterate efficiently within a training loop. ### Requirement
(Insufficient information: VO Q2 was only mentioned as possibly file dedup or LRU cache; cannot be reconstructed into an answerable prompt, ignored.)
## Problem: Multithreaded Web Crawler (Thread-Safe) Implement a thread-safe web crawler that starts from a list of seed URLs, fetches pages concurrently, discovers new links, and continues until ther
Implement a web crawler that collects all URLs reachable from `startUrl` that belong to the **same hostname** as `startUrl`. You are given: ```python class HtmlParser: def getUrls(self, url: str
You are given a string `text` and a vocabulary map `vocab`: - `vocab` maps token strings to integer ids. - `vocab` always contains a special token `"UNK"` whose id is some integer (e.g. `-1`). Imple
What to Expect in the Anthropic Onsite Coding Round
The Anthropic Software Engineer Onsite Coding round has a specific calibration purpose distinct from other rounds in the loop. Across 46+ verified reports on LeakCode for this exact round type, the consistent expectations: clear scoping of the problem before diving into a solution, explicit reasoning about complexity, structured handling of edge cases, and the ability to discuss trade-offs between two reasonable approaches.
Reports tagged with the Onsite Coding round at Anthropic show recurring patterns in difficulty and topic distribution. The Onsite Coding round is typically 45-60 minutes; the interviewer is calibrated against a specific rubric. The discriminator between candidates who advance and candidates who do not is rarely the final correctness of the answer. It is the path: did you clarify, did you verbalize your approach, did you handle edge cases, and did you communicate throughout.
How To Prepare for This Specific Round
Filter the questions below to the most recent reports (past 6-12 months). Questions tagged for this exact round type from this exact company at this exact role level are the highest-signal data available. Older reports may reference questions that have since rotated out of the company's pool.
Practice 4-6 representative problems from this set under timed conditions. The goal is not memorization (companies rotate questions); the goal is to internalize the patterns the interviewer typically reaches for and the depth of follow-up to expect. Reports on LeakCode also tag the typical follow-up depth at this round type, which is the discriminating signal between hire and no-hire calibration.
Onsite Coding Round Timing and Format
The Onsite Coding round at Anthropic typically runs 45-60 minutes. Use the first 2-3 minutes to clarify requirements; you should never start coding or designing without verifying the input/output format, constraints, and edge cases out loud. Use the next 5-7 minutes to verbalize your approach before writing any code. The middle 20-30 minutes are implementation. Reserve the final 10 minutes for testing with concrete examples and discussing optimization or trade-offs.
Time budget discipline is one of the most reliable senior-vs-junior discriminators in this round. Strong candidates verbalize where they are in their budget out loud ("I've used about 20 minutes, I have 15 minutes left for testing and one optimization"). This signals engineering maturity to the interviewer and creates positive feedback they can capture in writing.
Common Failure Modes in This Round
Reports tagged "no hire" at Anthropic Software Engineer Onsite Coding commonly cite: coding silently without verbalizing approach, jumping to implementation before clarifying requirements, missing edge cases (empty input, single element, very large input), producing working code that the candidate cannot refactor when asked, and failing to test their solution with concrete examples before declaring done.
The single most predictive failure mode in 2025-2026 reports: not asking clarifying questions. Interviewers at all FAANG companies are explicitly trained to weight this dimension. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's notes.
See All 46 Questions from This Round
Full question text, answer context, and frequency data for subscribers.
Get Access