I recently interviewed for a frontend role at Dropbox. The interview went well and I was able to answer all of the questions and got the correct output by using all the right techniques. The question was about selecting and returning all html nodes with a given class (I was not allowed to use any of the existing APIs). I used recursion to parse through the dom and return all nodes. The test cases ran successfully. But I still got rejected. Can someone point me to a good solution that would have helped me clear the interview? #dropboxinterview #dropbox #frontend
What was the input like? Was it an n-ary tree? Basically an n-ary tree traversal Or something else?
Interviewer must be junior developer. They always want perfect without knowing you do not need html to build scalable Frontend
Traverse tree breadth wise an n-ary tree like google said. Im surprised you did not hit the max recursion limit
The input was small because it was an interview. I did realize that it would hit stack overflow issue but I had already spent half of the interview time by then. Probably an iterative traversal would have helped me here.
Isn’t this just basic BFS? Why use recursion
Yeah I think I should have iteratively solved it. Recursion was overkill, but I had spent half my time on it already
Did you study for the interview? I don’t believe it should take half your time on it. What language did you use?
IMO, either BFS or DFS would work, but when done in an iterative fashion. Like ERTu34 said, you might end up getting a stack overflow due to too many recursive calls
Sorry my friend, that question has 3 parts and looks like you only got through part 1
Yeah, I think I took a lot of time solving the 1st part. I did get to the second part but, I could only answer it theoretically.
Yeah that’s definitely a Strong No in our book because part 1 is warmup, part 2 is the REAL question and part 3 is cherry on top. You’re supposed to cruise through part 1 in like 15 - 20mins
No
Cars
11h
686
Tesla ruined whole auto industry
Tech Industry
14h
629
I am a Goose Farmer. AMA
Tech Industry
8h
823
Received an offer from Netflix but don't like the manager
Software Engineering Career
6h
384
If your team does daily standups, your manager is a micromanager
Ask Blinders
18h
1855
How big are the balls of Google to lay off thousands and then do 70 BILLION in stock buyback?
Is recursion necessary?