Flipkart | PS/DS-1 Interview | 2 Questions asked
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2023-10-21Added By Anonymous
Source: Link
Company: Flipkart
Role: unknown
Stage: Interview
Location: unknown
Year: unknown
Original Experience:
Question - 1: You are given a string sand an integer k and we repeatedly make not greater than k duplicate adjacent removals on s until we no longer can. Return the final string after all such duplicate removals have been made. It is guaranteed that the answer is unique. Sample Input: s = aabbaaaba, k=3. Output: " " Question - 2: Given a tree, print and remove the leaf nodes until the entire tree is empty. You cannot modify the tree. The order of output should be intact. ---->7 -->2 1 ------>6 ---->4 -->3 ---->5 Output: 7 6 5 2 4 3 1
Role: unknown
Stage: Interview
Location: unknown
Year: unknown
Original Experience:
Question - 1: You are given a string sand an integer k and we repeatedly make not greater than k duplicate adjacent removals on s until we no longer can. Return the final string after all such duplicate removals have been made. It is guaranteed that the answer is unique. Sample Input: s = aabbaaaba, k=3. Output: " " Question - 2: Given a tree, print and remove the leaf nodes until the entire tree is empty. You cannot modify the tree. The order of output should be intact. ---->7 -->2 1 ------>6 ---->4 -->3 ---->5 Output: 7 6 5 2 4 3 1