Pergunta de entrevista da empresa SnapStream Media

I had 2 over the phone interviews with coding prompts I answer on a public coding doc. First was removing matching characters between two strings. Second was iterating through a tree, but he explained the prompt very indirectly to make it more complicated and refuse to say this is a tree or graph or whatever data structure. Follow up was more intense but I did much more well on. Implementing a stack, resolve a read/write deadlock, breath first search vs. depth first search.

Resposta da entrevista

Sigiloso

26 de out. de 2014

String question was simple but that's a trap, you have to solve it in the most efficient way possible, and in the way they would solve it. I did the simple way and then was asked to optimize. I used arrays but they wanted me use hashsets, which arguably have the same efficiency. Directly ask if the an object given to you models a tree or graph to get an idea what you're working with I screwed up at first because he wasn't being clear, but then dominated once I knew what to do. Implement a stack with using either dynamic array or linked list but ensure them you are aware of both. Breath searches on most shallow layer then iterates to the next layer, depth iterates all the way down and backtracks. They don't know the best answer for the deadlock question, they just want to know if you have an idea to try and solve it because they actually ran into that issue on the job.