4 ms·
Well... unless you did a good job explaining the algorithm for generating Pascal's triangle in simple terms I'd probably fail given the pressure. Otherwise, my
by trevelyan 15y ago
Well... unless you did a good job explaining the algorithm for generating Pascal's triangle in simple terms I'd probably fail given the pressure. Otherwise, my initial response would be a visit to Wikipedia where my eyes would promptly glaze over at the text talking about "binomial coefficients" and I'd decide your job advertisement was misleading and it probably isn't a good job anyway.
Assuming you terminated the interview first, I'd go home and come to resent you for asking such a deceptive question. A simple coding test does not invite someone to conceptualize a solution to an unknown problem in terms of rows when the interviewer expects a recursive solution. I'd find solace in noting that the recursive solution is far less efficient than simply building the table manually (pop quiz: calculate exactly how much less efficient in 30 seconds!), and assume that you didn't realize this or you would have asked a more clever brainteaser.
Either way, I'd leave the interview irritated you didn't want to talk about the real problems you needed to solve and upset you didn't look at any of the code I made available before you scheduled our interview. I'd eventually feel grateful things didn't work out, but I'd steer friends away from working with your company, out of the conviction the people interviewing and managing the programming staff don't understand how to judge programmer value, and that it isn't a good place for people who get things done.
- eurleif 15y ago>Well... unless you did a good job explaining the algorithm for generating Pascal's triangle in simple terms I'd probably fail given the pressure. How's this for simple terms? http://en.wikipedia.org/wiki/File:PascalTriangleAnimated2.gif http://en.wikipedia.org/wiki/File:PascalTriangleAnimated2.gi... It's on Wikipedia's page for Pascal's triangle. If your response to that page is to have your eyes 'glaze over' to the point where you can't find the animation (which has a simply-worded caption explaining the triangle), why should someone want to hire you?
- trevelyan 15y agoI'll tell you why anyone would hire me if you can answer my simple question about the relative efficiencies of the top-down versus recursive solutions. You've already had an hour and claim to be familiar with the problem space, so I think it's a fair measure of your suitability in this space. I'm going to go for coffee, but there's a whiteboard right there. Shouldn't take more than a minute or two.
- kamaal 15y agoOtherwise, my initial response would be a visit to Wikipedia where my eyes would promptly glaze over at the text talking about "binomial coefficients" and I'd decide your job advertisement was misleading and it probably isn't a good job anyway. You would be right in deciding that. Over the years I've seen all these puzzle and math kids have the least productivity in delivering business software. And besides if you spend say 30 minutes a day reading these interview puzzles online, you can game the system and get your way through. Without you even being tested on some basic skills required to win in the real world. You may know all the algorithms from the book by heart. But what's the whole point if you don't how to use a couple of unix text processing utilities? Puzzle kids generally answer that by saying something like sed can be learn't by reading a manual. If you can learn and work with sed by reading a manual on the job, then you can also learn and work with algorithms by reading manuals on the job too!