I had to give a wrong answer to get the job (2017)
151–160 of 409 posts
Re: I had to give a wrong answer to get the job (2017)
#152I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…
Couldnt you show them example on e.g whiteboard how it'd work? it'd be huge pros that you can explain concepts to people who do not know them in 5mins.
Re: I had to give a wrong answer to get the job (2017)
#153One thing this reminds me of is the use of "Compute the nth Fibonacci number" as an interview question. The interviewer may expect you to show off your knowledge of dynamic programming by memoizing the function. But you take a risk if you implement the matrix exponentiation algorithm [1], which is actually optimal in that it only uses O(log(n)) arithmetic operations. I had an interviewer once who seemed a bit skeptic…
Is it really sublinear though? The data that the algorithm accepts is a number n, the size of the data is thus m=log(n), so the algorithm runs in O(m) time -> linear in terms of data size. I vaguely recall there was some nuisance related to this (pseudopolynomial algorithms ring a bell), but haven't interviewed in a while so may be misremembering it.
Generally I would assume that multiplication and addition are constant time for big-O analysis, until given a reason otherwise. That might be less appropriate for fibonacci than most other problems though.
Re: I had to give a wrong answer to get the job (2017)
#154Re: I had to give a wrong answer to get the job (2017)
#155I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…
Re: I had to give a wrong answer to get the job (2017)
#156Earlier quoted context omitted.
Just a thought -- gaming is latency sensitive. Maybe their issue with it wasn't about average performance, but that the once-in-a-while perf hit would be enough to cause a bad experience for the person playing the game? I know I'd be frustrated if there was a predictable lag spike while playing a game.
No, latency didn't come up. (I agree that could be a reason not to use a dynamic array.) They were hung up on the idea that a dynamic array must be O(n) because at least some of the appends copy.
If you're the interviewee, it's up to you to get that clarification
Re: I had to give a wrong answer to get the job (2017)
#157I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…
In some cases amortized isn't good enough though, and games could certainly be one of them! (Anywhere you're servicing some kind of interactive request might qualify, depending on this size of your datastructures.) This is actually something I like to work through in interviews: OK, you've got amortized-constant-time append to your array-backed colletion, but now what if we need it to be really constant time? How cou…
Real time systems including games have hard limits on how long something can take in the worst case, not the average. In games this manifests as: All the stuff has to be done in 16ms to render a frame on time, if we're late the user will perceive a glitch. The consequences can be worse in control systems in any number of real-world systems where a glitch can lead to stability problems.
So getting back to TFA, this is part of knowing what the "right" answer is for the context.
Re: I had to give a wrong answer to get the job (2017)
#158I bombed an interview at a game company because I gave a right answer that I couldn't get them to understand. I don't remember the exact problem they wanted me to solve, but the answer involved a dynamic collection and they wanted it to grow with constant time complexity. They were probably looking for a linked list. But I said I'd use a dynamic array because those have constant time when averaged over a series of ap…
Re: I had to give a wrong answer to get the job (2017)
#159This is why, as a blind person, I'm fundamentally screwed when looking for a job. I suspect situations like this contribute greatly to the 70% unemployment rate in the blind community.
Re: I had to give a wrong answer to get the job (2017)
#160Earlier quoted context omitted.
The goal of the interview shouldn't always be to get the job. If you have any length of career, you are interviewing the company as much (or more) than they are interviewing you. My approach would have been to go with the new idea and see what discussion can come out of it. If they don't have time to get into it, that's one thing but if they are simply not open-minded to new ideas, I don't want to work there.
In the real world, people have to apply to dozens if not hundreds of jobs just to get an offer. The company has all of the power, so you tell them what they want to hear or you starve.
In another profession like say a specialized electrical engineer, there may be only a few positions posted a month and a handful of qualified people so both the engineer and the company would be desperate that they could together be a fit.
This story was about an anecdotal experience where the power dynamic was fairly equal