Tech IndustryNov 26, 2019
NewStressed:|

Would you disagree if the interviewer said something wrong

I was doing this coding round with a guy who asked me counting problem. I solved it with recursion. Then, showed the subproblems are over-lapping and there is optimal substructure, we should DP. Hence, I gave an approach when I cache the results in the recursion. He told this is not DP, and this is recursion + caching which is not DP! I am like what? I was confused by the guy for 10 mins. I didn't disagree with him, I thought that would be rude. He is very adamant so I don't think he was testing me by saying something wrong. Then I figured out he thought DP means only bottom-up approaches, I gave bottom-up approach and coded it. He is like this is good. What would you do in this situation? Would you disagree with the interviewer? I wasted 10 mins confused what to say. YOE: 1 year TC: $0(Got laid off recently)

Zenefits Azanx Nov 26, 2019

He's right, if you used recursion, then that's memoization (top down). Bottom up is dynamic programming.

New
Stressed:| OP Nov 26, 2019

Don’t you do memorization in bottom up?

IBM Trunk Nov 26, 2019

You should never disagree with the interviewer, especially with your TC level.

New
Stressed:| OP Nov 26, 2019

Hahaha.

Uber yaUberEx Nov 26, 2019

It’s fine in that you did it in coding round. If it be system design where answers are way more subjective things could be way more interesting. Maybe both sides would think the other side being incredibly dumb.

Facebook MCSW23 Nov 26, 2019

Agree that it should not work out right away and then walked out the door is the first time you slap the person with insults

American Express gandalf$$ Nov 26, 2019

What company was the interview at op? Seems like they have some real idiots

New
h0r4y Nov 26, 2019

Probably Google or Facebook. They like to ask dynamic programming questions.

New
Stressed:| OP Nov 26, 2019

Was a small 40 person startup in SF. I don’t want to shame the company here, hope you understand.

New
🤦‍♀️🤦‍♀️🤦‍♀️ Nov 26, 2019

They're both DP but some people think a solution with a 2D matrix/1D array is the only "real DP" lol

New
MWYL07 Nov 26, 2019

pedantic distinction since the time complexity and space complexity are usually the same.

PayPal maybeiam Nov 26, 2019

You should just say got it and divert the topic to your needs

OpenTable Meliodas Nov 26, 2019

It depends on the context. In your case, I would have asked the interviewer to define the terms they are using to make sure we are both talking about the same thing.