YourAlly

Anthropic Senior staff coding interview questions

These are the 5 coding questions YourAlly has tagged for Anthropic at Senior staff. On the YourAlly ladder this is Senior staff, the same level as Google L7, Meta E7 and Amazon L8.

A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level coding is often a smaller part of the loop, but the bar for clarity and speed stays high.

Practice a mock Anthropic Senior staff coding loopPractice Anthropic coding questions

Redact Sensitive SpansFree to read

Given text and a list of [start, end) spans to redact, return the text with those spans replaced by '[REDACTED]'. Spans may overlap; merge before replacing.

Input: text = "ssn 123-45-6789 ok", spans = [[4,15]] Output: "ssn [REDACTED] ok"

4 more coding questions

  1. Apply Ranked Byte Pair Merges Locked
  2. Parse Nested Policy Expressions Locked
  3. Sliding Window Maximum Latency Locked
  4. Token Bucket Rate Limiter Locked

Sign up free to practice all 5

Related pages

More Anthropic Senior staff rounds

Anthropic coding at other levels

Other companies at this level

Company guide

Anthropic interview guide in Academy