Solve grid shortest-path and tree DP
Company: TikTok
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Technical Screen
Quick Answer: This question pair evaluates proficiency in fundamental algorithmic techniques: finding shortest paths in a grid via breadth-first search and applying dynamic programming on trees to maximize a sum under adjacency constraints, assessing graph traversal, state management, optimal substructure recognition, and complexity handling.