Anthropic interview questions by role
On this page
Software Engineer interview practice questions
Full Anthropic software engineer prep guide: Anthropic software engineer
-
Standard library: given lines like 2026-03-04 ERROR upload 412 (date, level, component, code), count how many lines each component has per level and print the result sorted by component. Check yourself – blank lines, a line with a missing field, and ties in sorting.
-
Strings: write a function that turns a title into a lowercase slug with single hyphens, dropping characters that are not letters or digits. Check yourself – leading and trailing spaces, repeated punctuation, and an input that becomes empty.
-
Dictionaries: given two lists of (name, score) pairs from two sessions, return a combined list of names with their latest score, keeping the order in which names first appeared. Check yourself – a name in only one list, and a name repeated within a list.
-
Dates: using only your language’s standard date and time module, given event times like 09:15 and 23:40 from one day, compute how many minutes pass between the earliest and the latest event. Then say what changes if an event can fall after midnight. Check yourself – events given out of order, a single event, and two events on different sides of midnight.
-
Error handling: write a function that reads configuration lines of the form key=value, skips lines starting with #, and returns the settings plus the line numbers of any malformed lines. Check yourself – a line with no =, an empty value, a duplicate key, and spaces around the key.
-
Numbers and formatting: write a function that turns a number of seconds into a string like 1h 2m 9s, leaving out zero units. Check yourself – 0, 59, 61, 3599 and 3600 seconds, and what you print when every unit is zero.
-
Aggregation: given readings as (city, temperature) pairs, return the three cities with the largest swing between their highest and lowest readings, keeping input order when swings tie. Check yourself – a city with one reading, negative temperatures, and a tie for third place.
-
Bug hunt: read the short function below and say which input makes it fail, and why, then fix it.
def longest_word(words):
best = words[0]
for w in words:
if len(w) > len(best):
best = w
return best
Check yourself – an empty list, a tie between two words, and a list of one word.
Original practice, written in the style of the skills Anthropic describes. Unofficial, not affiliated with Anthropic. These are not real interview questions, do not predict anything, and carry no score.
Anthropic’s rules for AI use in its interviews: Can you use AI in an Anthropic interview?
Non-technical roles
Anthropic non-technical interview prep: what Anthropic says, plus a prep plan and checklist.
Sources
- Anthropic: Careers, read October 20, 2026: https://www.anthropic.com/careers
- Anthropic: Guidance on Candidates’ AI Usage, read October 20, 2026: https://www.anthropic.com/candidate-ai-guidance
- Anthropic: Designing AI resistant technical evaluations, read October 20, 2026: https://www.anthropic.com/engineering/AI-resistant-technical-evaluations
By Prepti Team. Last checked: October 20, 2026. Not affiliated with Anthropic.