Anthropic Software Engineer Coding & Algorithms Interview Questions
Practice 40 real Coding & Algorithms interview questions for Software Engineer roles at Anthropic.

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Implement a crash-resilient LRU cache
Implement an LRU-based memoization helper with behavior similar to a standard Python LRU cache. You are given an interface like this: `python class LR...
Implement a Parallel Image Processor
You are building a batch image-processing utility. Implement a function that receives a list of jobs. Each job contains: - input_path: the source imag...
Build a concurrent web crawler
Implement a web crawler that starts from a given URL and visits every reachable page on the same host. You are given: - start_url: a string representi...
Implement an in-memory DB with TTL backup/restore
Problem Design an in-memory database that stores values in a nested structure: - key (string) → field (string) → value (string) - Each (key, field) en...
Implement a Batch Image Processor
Implement a program that applies basic image transformations to a batch of images. You are given a list of input image paths and, for each image, a se...
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-...
Design an IPv4 Address Iterator
Design a class that iterates through IPv4 addresses. An IPv4 address is a string in the form a.b.c.d, where each octet is an integer from 0 to 255. Im...
Implement crawler and file deduplication
The interview included two coding exercises: 1. Build a web crawler starting from a seed URL within a single domain. First implement a single-threaded...
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...
Build a least-recently-used cache
Implement a fixed-capacity key-value cache with least-recently-used eviction. Requirements: - get(key) returns the value for key, or -1 if the key doe...
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...
Parse and Reconstruct Stack Trace
Given a multi-line stack trace string from a single thread (e.g., each frame is in the form 'at Module::Function(file:line)'), design and implement a ...
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...
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....
Detect duplicate files efficiently
You are given access to a very large file system containing file paths and read access to file contents. Design an algorithm to identify groups of fil...
Crawl Same-Domain Links
Implement a Python function that crawls a website starting from a seed URL and returns all unique pages reachable within the same domain. Assume a hel...
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...
Implement a longest-match tokenizer
You are given: - A vocabulary that maps strings to integer token IDs. - An input string text. Tokenize text from left to right using greedy longest-ma...
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 high-throughput hashing for kernels
Design a high-throughput hash-based lookup to be called inside a tight kernel. Choose between open addressing and chaining, specify the load factor, p...