Anthropic Software Engineer Coding & Algorithms Interview Questions

Practice 71 real Coding & Algorithms interview questions for Software Engineer roles at Anthropic.

71 Questions 1 Company07.08.2026
Showing 11 results
Role
Anthropic logo
Anthropic
Medium
Software Engineer

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...

Coding & Algorithms
17
0
179 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement file deduplication at scale

Implement a command-line tool to find duplicate files in a directory tree. Use OS/pathlib primitives to recursively enumerate files. Apply prefilters ...

Coding & Algorithms
18
0
152 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

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...

Coding & Algorithms
51
0
471 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

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(...

Coding & Algorithms
16
1
211 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

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...

Coding & Algorithms
10
0
166 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Detect n-length consecutive sequences

Given an unsorted collection of integers and a parameter n > 0, determine whether there exists a set of n distinct integers that form a run of consecu...

Coding & Algorithms
23
0
216 people solved
Aug 13, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Compute matrix trace and support updates

Given an n x n integer matrix M, implement a function trace (M) that returns the sum of its main diagonal. Follow-ups: (a) If you receive q point upda...

Coding & Algorithms
15
0
185 people solved
Aug 13, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

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...

Coding & Algorithms
14
0
143 people solved
Aug 4, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Detect runs and answer suffix queries

Given an array of comparable elements a[0..m-1] and an integer N: 1) Write a function that returns the maximum length of any run of consecutive equal ...

Coding & Algorithms
18
0
250 people solved
Jul 28, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Find and remove duplicate files

Given a directory tree that may not fit in memory, detect and optionally remove duplicate files. Define the algorithm, including how you handle very l...

Coding & Algorithms
22
0
166 people solved
Jul 26, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Find the Slowest Function from Profiler Events

You are given a time-ordered profiler event log for a single-threaded program. Each event is one of: - START functionName timestamp: execution enters ...

Coding & Algorithms
1
0
14 people solved
Jun 17, 2025

Explore more Anthropic Software Engineer interview questions

Real questions from candidate reports, grouped by topic.

Other Anthropic Software Engineer categories
Browse all