Airbnb Interview Question

DP question with bit masking but interviewer was fine with recursive solution too