I just had a 45 min phone interview with an engineer. I am applying for L4 software engineer position with the YOE 3 +. I only had one question, and it was typical "Given a list of prices, return the combination with the most outcome" which is normally solvable with recursion and DP. I consider this easy ~ medium. It was totally a doable problem. However, I felt the time was too short. If I did it my own, I would have done it in a shorter time, but there is no way I would complete the code under this kind of environment. You have to digest the problem, explain your thought process, code, debug, dry run, and optimize where you only have ~ 30 minutes left after the introduction and someone is watching your code. The interviewer also said that my code has to be as optimal as possible and production quality, but not expecting the most optimal or 100% bug-free. In the end, I was able to come up with the recursion with some bugs. I did not get to the point where I added memorization, but let the interviewer know my next optimization steps. He said my code will be submitted to the hiring committee and will return back to me after ~ 2 weeks or less. Is this a common experience? #google #softwareengineer #phoneinterview #interview #leetcode
Actually the solution to this problem is five lines of code or so For i fron 1 to n-1 Profit+=max(0,prices[i]-prices[i-1]) Return profit Sorry dude, just grind LC next time
I wonder did he have to return just the result? I thought by op’s description he had to return the “combination” as in list of values to pick. But idk hard to tell exactly what the problem is from description without an example. Also op didn’t mention whether it had to be in order or not.
You had to return a set. Order does not matter.
30 mins to finish a medium problem is absolutely normal. If you can problem solve you already have the skills and all you need is practice until you can finish medium problems in about 15-20 mins.
I agree. It is my pretty much the first time interviewing after three years. I have been reading for ~two weeks but haven't really coded under this kind of pressure/time. Hope I can do better next time : )
I thought now they dont ask dp.
Looooooool funny
So it might be for fb, but somewhere I definitely read either fb or google doesn’t ask dp anymore 🤔
This isn’t common at all. I had two back to back phone interviews and both asked me LC hards for an internship position. You got extremely lucky.
I recently posted something similar about my google phone screen. I would consider the questions I got to be easy/medium LC as well. I thought I screwed up the last one and I sort of did but the next morning they said I passed and would be brought to on-site. I completed the first problem, it was the follow up I kind of made halfway and then explicitly got wrong before time was up. This has been my only experience interviewing in a long time but based on all the FUD about LC hard being asked I’m not convinced it’s not just people lying for some twisted reason. Or maybe we both just had good interviewers.
Tech Industry
Yesterday
2887
I am starting to think Chinese interviewers currently fail non-Chinese candidates on purpose.
Tech Industry
8h
2116
Asians - what are your thoughts on asian female white male ?
World Conflicts
Yesterday
534
American police seem to work only when Israel is challenged
Tech Industry
Yesterday
3803
Crossed a line with my boss
Tech Industry
Yesterday
853
4yoe at Meta . Will job hunting be easier ?
Are you saying this was a knapsack problem? Only getting to an exponential recursive solution in 30 mins is pretty bad imo. I don't think an LC medium DP problem is unfair if you've practiced DP enough.
I don't find it unfair. It is indeed totally fair. I found it very easy too. I am just trying to calibrate my head so that I know what to expect and what to practice next time. I just thought that it is hard to reason under that kind of pressure. But, yea. I would have done better ‾\_(ツ)_/‾
However, wouldn't recursion and DP pretty much the same in this case other than replacing your call with a variable? (Maybe with some if statements but it will take at most 3 lines) I told the interviewer about memorization first time I read the problem. I hope he puts that into the consideration. Anyway, let me forget about and move on. I will take it as a lesson: ) Thanks!