Company: Msci_30july
Difficulty: medium
Find Parent in Tree Problem Description Imagine an infinite family tree built from numbered members, where each member is labeled starting from 1. Member number n has exactly n children. For example: Member 1 has 1 child. Member 2 has 2 children. Member 3 has 3 children. Given the label of a member, find the label of that member's parent. Complete the findParent function in the editor with the following parameter(s): int processNumber : the label of the member to query Returns: int : the label of the parent member Examples Example 1: Input: processNumber = 6 Output: 3 Explanation: Building out the tree level by level: member 1's only child is 2. Member 2's children are 3 and 4. Member 3's children are 5, 6, and 7. Since 6 falls among member 3's children, its parent is 3. Constraints 2 <= processNumber <= 10^9