Anthropic, the AI research company behind the Claude language model series, has quickly become a leading voice in the safe and interpretable AI movement.Their mission is grounded in alignment and responsibility, and that philosophy carries into their hiring process. Anthropic OA for software engineering roles reflects their high technical standards. Candidates are evaluated not only on their algorithmic problem-solvingability, but also on writing clean, maintainable code that demonstrates systems-level thinking, privacy awareness, and performance trade-offs.

Below are three representative Anthropic-style OA questions, along with insights and code samples.
Question 1: Sensitive Data Redactor
Problem:
Write a function that scans a block of user-generated text and redacts sensitive entities such as email addresses, phone numbers, and credit card numbersby replacing them with [REDACTED]
.
Input:
text = "Contact me at john.doe@example.com or call 555-123-4567. My Visa is 4111-1111-1111-1111."
Expected Output:
"Contact me at [REDACTED] or call [REDACTED]. My Visa is [REDACTED]."
Question 2: Token Budget Optimizer
Problem:
You are given a list of generated text segments from an LLM, each with a token count and a relevance score. Your goal is to return the most relevant subset ofsegments such that their combined token count does not exceed a given limit.
This is a variant of the 0/1 Knapsack Problem.
Input:
segments = [
{"text": "Answer A", "tokens": 5, "score": 8},
{"text": "Answer B", "tokens": 7, "score": 13},
{"text": "Answer C", "tokens": 4, "score": 6}
]
limit = 10
Expected Output:
A subset (e.g., ["Answer A", "Answer C"]
) maximizing score under token limit.
Reference Code:
def token_budget_optimizer(segments, limit):
n = len(segments)
dp = [[0] * (limit + 1) for _ in range(n + 1)]
for i in range(1, n + 1):
tokens = segments[i-1]['tokens']
score = segments[i-1]['score']
for j in range(limit + 1):
if tokens <= j:
dp[i][j] = max(dp[i-1][j], dp[i-1][j-tokens] + score)
else:
dp[i][j] = dp[i-1][j]
# Reconstruct the chosen subset
res = []
j = limit
for i in range(n, 0, -1):
if dp[i][j] != dp[i-1][j]:
res.append(segments[i-1]['text'])
j -= segments[i-1]['tokens']
return res[::-1]
Question 3: Rate-Limited Logger
Problem:
Design a logging system that prints incoming messages only if the same message hasn’t been printed in the last 10 seconds. This simulateslogging at scale while avoiding log flooding.
Input:
log_system.should_log(1, "error: out of memory") # True
log_system.should_log(3, "error: out of memory") # False
log_system.should_log(11, "error: out of memory") # True
Output:
Return True
if the message should be printed; else False
Unlock Top Tech Offers with Programhelp
Programhelp is your trusted partner for landing offers from global tech giants like Amazon, Meta, and Google. We offer full-spectrum support including OA testassistance, live voice relay for video interviews, full proxy interview services, and remote cheating solutions using advanced audio transmission technologies. Whether you’re applying for internships, full-timeroles, or graduate programs—our customized coaching, exam help, and programming outsourcing services are designed to get you results.Let us handle the pressure—so you can secure your dream offer.