Mixpanel | Software Engineer | Coding | Phone Screen

JKjknollh·
Interview Date:January 6, 2026Region:UnspecifiedHiring Team/Org:General Hire

Flatten Array of Infinite Depth: You are given an array that may contain values or other arrays nested to any depth. Write a function that returns a flat array containing all the values in the same order. Do not assume a maximum nesting depth. Input: [1, [2, [3, 4]], 5] Output: [1, 2, 3, 4, 5] Input: [[[]], [[[4, 3]]], []] Output: [4, 3] Input: [] Output: [] Input: [1, [], [2, [[], [3]]]] Output: [1, 2, 3]

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 continue
0

Discussion

0

Log in to post a comment or vote.

Sort by
Loading comments...

Interview Resources

InterviewDB

About InterviewDB

Crowdsourced Interview Question Bank for Job Seekers in Tech/Finance Industry

Copyright © 2026 InterviewDB. Victory is reserved for those who are willing to pay its price.