Solve tree and DP problems
Company: Amazon
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This pair of problems evaluates proficiency with tree data structures and traversal concepts (deepest shared ancestor) and with dynamic programming/state optimization on linear arrays (maximizing non-adjacent house values), assessing algorithmic reasoning, complexity awareness, and data-structure manipulation.