Airbnb | Technical Screen Interview | Senior Software Engineer Role

airbnb logo
airbnb
Senior Software Engineer Role
May 5, 20255 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'.

Full Experience

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

Interview Questions (1)

Q1
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

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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