In the second interview I am asked to cook up an algorithm to compute position (m, n) in a Pascal triangle; free implementation, pseudocode is still good. Together with the company CTO, who was the interviewer in the first interview, a backend and frontend developer also joined.
Anónimo
I start by writing it down in pseudo-Scala, since no IDE was available, in the direct-recursive fashion. I am then invited to go to the whiteboard to elaborate a little, where I see the nature of the problem is clearly fitting a dynamic programming technique. I write down the recursive equation and elaborate a little on the complexity of the dynamic approach, showing that the complexity goes down from exponential to quadratic.