Airbnb Senior Software Engineer TPS Round

airbnb logo
airbnb
· Senior Software Engineer
March 18, 2026 · 3 reads

Summary

I participated in a Senior Software Engineer TPS round at Airbnb, where I was presented with a challenging coding problem involving optimal property selection based on capacity and number of properties.

Full Experience

Helping the Leetcode Community!

For a given neighborhood and group size G, choose a subset of properties such that:

- Total capacity >= Group_size

- Among all such subsets, choose the one with minimum number of properties

- If multiple subsets use the same number of properties, choose the one with minimum total capacity

- Return the selected property IDs

- If impossible, return -1
Sample Input:

function(List<Property> properties, int group_size, String neighbourHood) 
-> return type: List<Integer> property_ids


Property1 : {
    Id:1,
    Capacity: 5,
    NeighborHood: "downtown"
}
Property2 : {
    Id:2,
    Capacity: 3,
    NeighborHood: "downtown"
}
Property3 : {
    Id:3,
    Capacity: 1,
    NeighborHood: "downtown"
}
Property4 : {
    Id:4,
    Capacity: 3,
    NeighborHood: "uptown"
}
Property5 : {
    Id:5,
    Capacity: 2,
    NeighborHood: "uptown"
}

Interview Questions (1)

1.

Optimal Property Selection for Group Size

Data Structures & Algorithms
For a given neighborhood and group size G, choose a subset of properties such that:

- Total capacity >= Group_size

- Among all such subsets, choose the one with minimum number of properties

- If multiple subsets use the same number of properties, choose the one with minimum total capacity

- Return the selected property IDs

- If impossible, return -1
Sample Input:

function(List<Property> properties, int group_size, String neighbourHood) 
-> return type: List<Integer> property_ids


Property1 : {
    Id:1,
    Capacity: 5,
    NeighborHood: "downtown"
}
Property2 : {
    Id:2,
    Capacity: 3,
    NeighborHood: "downtown"
}
Property3 : {
    Id:3,
    Capacity: 1,
    NeighborHood: "downtown"
}
Property4 : {
    Id:4,
    Capacity: 3,
    NeighborHood: "uptown"
}
Property5 : {
    Id:5,
    Capacity: 2,
    NeighborHood: "uptown"
}

📣 Found this helpful? Please share it with friends who are preparing for interviews!

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!