airbnb logo
Airbnb· Senior Software Engineer Role

Airbnb | Technical Screen Interview | Senior Software Engineer Role

Posted
5 May 2025
407 reads

Summary

I had a technical screen interview for a Senior Software Engineer role at Airbnb, where I was presented with a detailed problem called 'Property Booking Optimizer'.

How it went

Problem: Property Booking Optimizer

Given:

  • A list of properties where each property has (id, neighborhood, capacity)
  • A group size (number of people that need accommodation)
  • A target neighborhood

Goal:
Find the optimal combination of properties in the given neighborhood that can accommodate the group with these rules:

  1. Total capacity must be >= group size
  2. Choose the combination with minimum total capacity that exceeds group size
  3. If multiple combinations have same capacity, choose the one with fewer properties
  4. If no valid combination exists, return empty list

Examples:

Example 1:
Properties:

  • (1, "area1", 5)
  • (2, "area1", 3)
  • (3, "area1", 2)
  • (4, "area2", 4)

GroupSize = 5, neighborhood = "area1"
Output: [1] // Property 1 alone has capacity 5, which is optimal

Example 2:
Same properties, GroupSize = 6, neighborhood = "area1"
Output: [1, 3] // Properties 1+3 give capacity 7, which is minimal solution

Example 3:
Properties:

  • (1, "area1", 5)
  • (2, "area1", 3)

GroupSize = 10, neighborhood = "area1"
Output: [] // No combination can accommodate 10 people

Questions asked (1)

  1. 01

    Property Booking Optimizer

    Data Structures & Algorithms

    Problem: Property Booking Optimizer

    Given:

    • A list of properties where each property has (id, neighborhood, capacity)
    • A group size (number of people that need accommodation)
    • A target neighborhood

    Goal:
    Find the optimal combination of properties in the given neighborhood that can accommodate the group with these rules:

    1. Total capacity must be >= group size
    2. Choose the combination with minimum total capacity that exceeds group size
    3. If multiple combinations have same capacity, choose the one with fewer properties
    4. If no valid combination exists, return empty list

    Examples:

    Example 1:
    Properties:

    • (1, "area1", 5)
    • (2, "area1", 3)
    • (3, "area1", 2)
    • (4, "area2", 4)

    GroupSize = 5, neighborhood = "area1"
    Output: [1] // Property 1 alone has capacity 5, which is optimal

    Example 2:
    Same properties, GroupSize = 6, neighborhood = "area1"
    Output: [1, 3] // Properties 1+3 give capacity 7, which is minimal solution

    Example 3:
    Properties:

    • (1, "area1", 5)
    • (2, "area1", 3)

    GroupSize = 10, neighborhood = "area1"
    Output: [] // No combination can accommodate 10 people

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Airbnb recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!