Apple | Software Engineer (Mid Level) | Coding | Phone Screen
Interview Date:September 7, 2026Region:NA (North America)Hiring Team/Org:Apple AWS
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).” Example 1: Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1 Output: 3 Explanation: The LCA...
Sign in to view the full interview experience
Create or use your InterviewDB account to read the full Warren post and all shared details.
Sign in to continue0