Facebook | Phone Screen | Sums of all the root-to-leaf paths & Kth largest element

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2019-09-24Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Q1: Write a function that, given a binary tree of integers, returns the sums of all the root-to-leaf paths.
Input: 2 / \ 3 5 / \ 1 5 Output: [6, 10, 7]

Q2: https://leetcode.com/problems/kth-largest-element-in-an-array/

Comments