← Airbnb Interview Insights

Airbnb·Software Engineer·Technical Phone Screen·Junior

JuniorRejected
May 2026Remote

Summary

Went into an Airbnb technical interview expecting DSA after the recruiter specifically said to prep for that, and got something completely different. They showed existing Python classes and asked me to extend them, which I hadn't touched in a while. Ran out of time and didn't make it through.

Questions Asked (1)

Q1

Given a set of existing Python classes with methods, write a new class that extends the functionality with an additional method.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This is where it fell apart for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the existing class hierarchy and the expected behavior of the new method, including edge cases and interactions with inherited methods. Then design the subclass using inheritance, ensuring you call super() appropriately and follow Liskov Substitution Principle. Finally, discuss trade-offs such as composition vs inheritance and testability.

Pro tip: Demonstrate awareness of the open-closed principle by extending behavior without modifying existing classes, and mention how you would unit test the new method in isolation and in integration with the parent class.

1. Clarify requirements and existing code

Ask questions to understand the existing classes, their methods, and the desired functionality of the new method. Identify any constraints or expected inputs/outputs.

2. Choose inheritance vs composition

Decide whether subclassing is appropriate or if composition would be more flexible. Justify your choice based on the problem context and maintainability.

3. Design the subclass

Outline the class definition, including the new method and any overridden methods. Ensure proper use of super() to leverage parent functionality and avoid breaking existing behavior.

4. Consider edge cases and testing

Discuss potential edge cases, such as invalid inputs or interactions with parent methods. Explain how you would test the new method and the subclass as a whole.

5. Discuss trade-offs and alternatives

Mention any trade-offs of your approach, such as increased coupling with inheritance, and propose alternative designs if relevant.

Key Points to Mention

  • Inheritance and the use of super() to extend behavior
  • Liskov Substitution Principle and ensuring the subclass can replace the parent
  • Open-closed principle: extending without modifying existing code
  • Composition over inheritance as an alternative design
  • Unit testing the new method and integration with parent class
  • Edge cases such as method overriding, multiple inheritance, and method resolution order (MRO)

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