Anthropic logo

Anthropic Hard Interview Questions

7 hard-level practice questions for Anthropic technical interviews

Anthropic software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
5
Coding
1
System Design
coding Hard Verified Question #1

1. OA[CodeSignal] Cloud File Storage System


Category: Graph coding problem

Question Your task is to implement a simple in-memory cloud storage system that maps objects (files) to their metadata (name, size, etc.). You...

Input: Graph (nodes and edges)
Output: Array
coding Hard Verified Question #2

2. OA[CodeSignal] Design Banking System


Category: Graph coding problem

Question Design a banking system that supports account management, transactions, and various financial operations.

Input: Graph (nodes and edges)
Output: Computed result
coding Hard Verified Question #3

3. Multi Threaded Web Crawler


Category: Graph coding problem

Description Given a URL startUrl and an interface HtmlParser, implement a concurrent web crawler to discover all unique URLs that share the...

Input: Graph (nodes and edges)
Output: Array
coding Hard Verified Question #4

4. OA[CodeSignal] In-Memory Database


Category: Graph coding problem

Description Implement a simplified in-memory database that supports record manipulation with various operations. The system should handle basic...

Input: Graph (nodes and edges)
Output: Array
coding Hard Verified Question #5

5. Distributed Statistics Engine


Category: String coding problem
A large dataset of integers is distributed across k workers (indexed 0 to k-1). Each worker holds an unsorted, roughly equal slice of the data....
Input: String
Output: Printed output
system design Hard Verified Question #6

6. System Design - Inference API


Category: Queue-based system design problem
You need to design a high-concurrency inference API system. This system must handle many requests happening at the same time. You are given an API...
Input: Number(s)
Output: Computed result
coding Hard concurrency #1

1. Concurrency and Fault Tolerance — Implement a fault-tolerant concurrent component

Background: Anthropic is focused on developing reliable AI systems that require concurrent operations to handle high-throughput data streams efficiently. Ensuring that these operations are fault-tolerant is crucial for maintaining system integrity and performance, especially in an AI context.
Problem statement: Implement a concurrent class Counter that counts the number of times a specific event occurs while ensuring thread safety. The increment method should increase the counter when an event happens, and the get method should return the current count. If a failure occurs while incrementing, the system should handle this gracefully without losing the count. Use a lock mechanism to ensure thread safety and implement recovery logic.
Function/class signature:
  • def increment(self) -> None:

  • def get(self) -> int:

Example 1:
Input: Event occurs → increment() called
Output: Count = 1 → Explanation: The counter is increased by one.
Example 2:
Input: Event occurs rapidly 100000 times → get() called
Output: Count = 100000 → Explanation: The counter correctly reflects the total increments of events.
Constraints:
  • Maximum concurrent increments: 10,000

  • Ensure failure handling does not result in lost increments

  • Methods must be executed safely in a multi-threaded environment.

Start practicing Anthropic questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free