← Airbnb Interview Insights

Airbnb·Software Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Airbnb software engineering interview with two meaty coding/design problems back to back. Part A was a retry utility in TypeScript and Part B was a cross-field form validation component. Both had enough edge cases to keep you honest.

Questions Asked (2)

Q1

Implement a higher-order function that wraps any async (or sync) function with retry logic, supporting single retry, N retries, and exponential backoff with configurable base, cap, and optional jitter. The wrapper should also handle per-attempt timeouts, an overall timeout, cancellation via AbortController, and filtering which errors are retryable.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one took me longer than I expected to even scope.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and edge cases, then outline a modular design that separates retry policy, timeout handling, and cancellation. Implement the wrapper with composable pieces, and discuss trade-offs like backoff strategies and error filtering.

Pro tip: Emphasize idempotency and the importance of not retrying non-idempotent operations without safeguards; also mention that you'd use AbortController to cancel in-flight attempts and avoid resource leaks.

1. Clarify Requirements and Constraints

Ask about expected use cases, error types, and whether the function is idempotent. Confirm details like default retry count, backoff parameters, and timeout behavior.

2. Design the API and Configuration

Define the wrapper signature and options object (e.g., retries, backoff, timeouts, signal, retryableErrors). Ensure it works for both sync and async functions by normalizing to promises.

3. Implement Retry Logic with Backoff

Create a loop that attempts the function, catches errors, and decides whether to retry based on the error filter. Calculate delay using exponential backoff with cap and optional jitter.

4. Integrate Timeouts and Cancellation

Use Promise.race or AbortController to enforce per-attempt and overall timeouts. Propagate cancellation to the underlying function via the signal.

5. Discuss Trade-offs and Edge Cases

Cover scenarios like non-idempotent operations, memory leaks from unhandled timers, and how to handle errors that occur during backoff delays. Mention testing strategies.

Key Points to Mention

  • Idempotency and safety of retries for different HTTP methods or operations
  • Exponential backoff with jitter to avoid thundering herd
  • Using AbortController for cancellation and timeout management
  • Error filtering: distinguishing retryable vs non-retryable errors (e.g., network vs 4xx)
  • Per-attempt vs overall timeout semantics and how to combine them
  • Composability and reusability: making the wrapper generic and testable

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Build a form component with three text inputs and a validation system where one validator checks each field's value length against a configurable min and max, and another validator rejects the submission if any two fields share the same value. Changing one field should trigger revalidation of the other fields to keep cross-field constraints up to date.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

Cross-field validation sounds routine until you actually think about when to revalidate.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a component with controlled inputs and a validation system that runs on every change. Implement per-field length validators and a cross-field uniqueness validator, ensuring that changing any field triggers revalidation of all fields. Discuss trade-offs between validation strategies and how to handle performance and user experience.

Pro tip: Emphasize that validation should be debounced or run on blur for better UX, but for cross-field constraints, immediate revalidation on change is necessary to keep the form consistent. Also, consider using a validation library or a custom hook to encapsulate logic and avoid duplication.

1. Clarify Requirements and Constraints

Ask about the expected behavior: should validation run on every keystroke or on blur? What are the min/max defaults? Should errors be displayed per field or globally? Are there performance concerns with frequent revalidation?

2. Design the Component Structure

Outline a controlled component with state for each field's value and errors. Use a single source of truth for form state, and plan to lift validation logic into a custom hook or utility function for reusability.

3. Implement Validation Logic

Create a length validator that checks each field against configurable min/max. Create a uniqueness validator that compares all pairs of fields. Ensure validators return clear error messages and are composable.

4. Handle Revalidation on Change

When any field changes, re-run all validators (or at least the affected ones) to update errors. Discuss strategies to avoid infinite loops and ensure efficient re-renders, such as using useEffect or a validation schema.

5. Discuss Trade-offs and Edge Cases

Talk about performance implications of revalidating all fields on every keystroke, and consider debouncing or validating on blur for length checks while keeping uniqueness checks immediate. Address edge cases like empty fields, whitespace, and case sensitivity.

Key Points to Mention

  • Controlled components and single source of truth for form state
  • Configurable validation rules (min/max length) and how to pass them as props or config
  • Cross-field validation: comparing all pairs and handling duplicates
  • Revalidation triggers: onChange vs onBlur, and debouncing for performance
  • Error state management and displaying errors per field or globally
  • Trade-offs between immediate feedback and performance, and potential use of validation libraries like Yup or Zod

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.