TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What are interviewers looking for when they give you puzzles?

13 点作者 cmorgan8506大约 10 年前
I&#x27;ve been doing some programming interviews lately, and they&#x27;ve all included &quot;typical&quot; programming challenges. A lot of them can be done through brute force, but it&#x27;s evident they are looking for the optimal solution ie. O(n).<p>I&#x27;m curious, do these companies want to see if you&#x27;ve already done a similar questions and are able to re-apply the solution? Or are they looking for you to produce a novel approach to the problem? If the latter, is it a typical expectation for a Software Engineer to be able to produce optimal solutions in short periods of time like that?<p>I&#x27;ve been spending a lot of time studying these types of interview questions, but I continue to run into puzzles I&#x27;ve never seen. I&#x27;m concerned that they are looking for a degree of problem solving skills that I might not have.

9 条评论

gregjor大约 10 年前
I have concluded the main value of these tests and interview puzzles is humiliation. It&#x27;s like a fraternity hazing -- if you can survive without losing your cool you get to join the club. If you&#x27;ve been hired after one of these nasty tech interviews you&#x27;ve probably sat around with your new co-workers hearing them make fun of the candidates who didn&#x27;t make the grade.<p>If someone interviewing you has a CS degree from MIT they may want to show off to you and everyone else how much they know and how clever they are. It&#x27;s possible the job requires deep computer science expertise, but most programming jobs simply don&#x27;t.<p>A few years ago Google -- famous for their tech interviews -- revealed that they had found no correlation between the interview tests and puzzles and job performance.<p>My own experience (36 years) working with many, many programmers in all kinds of environments is that some are good at puzzles and enjoy them, and others aren&#x27;t. It doesn&#x27;t appear to have much to do with their ability to write the bread-and-butter type of code that most of us spend our careers writing. Sure, it&#x27;s good (maybe essential in some contexts) to know if an algorithm is O(n) or O(n^2). I&#x27;ve worked on projects where recognizing a better algorithm made the code faster or cleaner. But these are edge cases for most programmers, who are mostly shuffling data from one format to another and trying to get their build system to run on their laptop.<p>Of course you can ask the interviewers what they expect to learn from sweating you over puzzles, or how many times they have had to move Mt. Fuji in their day-to-day work, but challenging the interview process is probably not going to help your prospects.
评论 #9484288 未加载
mrcold大约 10 年前
Most of them do it because everybody else is doing it. Every time some poor soul gets tasked with interviewing candidates, he just fires up a google search to find good interview questions. He reads about puzzles, fizzbuzz and <i>&quot;analyzing your candidate&#x27;s though process&quot;</i>. And with nothing else in sight, he accepts them as the golden standard.<p>The best part is that each and every one of these interviewers thinks they&#x27;re special. Like they are somehow clever and intelligent by asking this type of questions. They don&#x27;t even realize that they are using the same lazy approach everybody else is taking.<p>The truth is, tech interviews revolve around your interviewer. How you make HIM feel. I&#x27;ve seen idiots get hired because they were enthusiastic. And extremely intelligent people rejected because <i>&quot;they couldn&#x27;t communicate the way I like it&quot;</i>.<p>So in an interview forget about your skills, experience and anything else related to the job. It doesn&#x27;t matter. Just woo the person across the table and you will get an offer. This works most of the time for shitty companies with lazy interviewers. And that&#x27;s most of them.<p>Personally, I found that that companies that allow this type of interviewing behavior will overwork and underpay you. Because they don&#x27;t care. They just want to push things out to make a quick buck. If you want to be treated like an expert that has a brain in his skull, avoid them completely.<p>Instead, find the companies that trust your experience. That act like you&#x27;re as good as you say. And just make a quick check to see if you know what you&#x27;re talking about. They are rare and most of them are startups. But the higher pay and better work environment is completely worth it.
评论 #9488901 未加载
giaour大约 10 年前
You&#x27;re right to think that&#x27;s there&#x27;s almost always a trick, but interviewers generally are more interested in watching your work process than in seeing if you can get it.<p>When a candidate is struggling or even just asks me, &quot;is there a trick to this that I&#x27;m not seeing?,&quot; I will give them pretty big hints. They get bonus points for knowing when to ask for help and&#x2F;or for being able to incorporate new information into their code quickly. I&#x27;ve always been offered the same courtesy when on the other side of the table.<p>That said, I personally don&#x27;t give much weight to challenges or tests and would be surprised to hear if anyone considered them more important than relevant experience.
评论 #9482045 未加载
wikwocket大约 10 年前
Okay, so there&#x27;s sort of a spectrum, with true <i>puzzles</i> (like &quot;How many golf balls would fit inside a jumbo jet&quot;) on one side, and true work sample tests (like &quot;Work with us to address a programming challenge typical of what we do&quot;) on the other side.<p>True puzzles do not provide very much useful information, as they are often based on a trick, and don&#x27;t actually overlap a lot with what we do. Even algorithmic puzzles are pretty dumb.<p>But problem solving, O(n), and composing algorithms <i>is</i> very important to what we do. So what I&#x27;m looking for when I ask you to write a function so solve X is:<p>- Can you understand a problem and critically think about it?<p>- Can you handle super-basic logic to work out a solution?<p>- Do you at least vaguely understand performance concerns, i.e. can you identify whether a given input is problematic, or talk about possible ways to improve it?
评论 #9481697 未加载
davismwfl大约 10 年前
I don&#x27;t ask many of these anymore but even when I do and have in the past it is never to humiliate anyone. To that point I don&#x27;t even care if they give the right answer, what I want someone to do is talk out how they&#x27;d figure it out.<p>So at least in my opinion it is about seeing how you think not whether you can solve some complex problem in 5 minutes. This is also why I have changed how I ask and what I ask. I&#x27;ve moved to telling people up front that I don&#x27;t care if they get the right answer, I just want them to show me their thought process and how they would go about solving it. And I will also participate and provide feedback and talk through it with you like we would as team members. This way we can see how good or bad we might work together.
评论 #9481569 未加载
JSeymourATL大约 10 年前
What are interviewers looking for&gt;<p>You can tell a great deal about the interviewers sophistication, business acumen, and level of seniority by the types of questions they ask.<p>The puzzler question may come off amateurish. Sometimes the interviewer is simply probing for emotional intelligence and good humour. They want to know if you&#x27;ll be a cultural fit and accretive to the team. Play along, it&#x27;s part of the process.<p>Sadly, the first level of interviews are often done by low-level types, even worse...HR flunkies.
theaccordance大约 10 年前
Different companies have different reasons for code tests. Generally speaking, here&#x27;s what you should expect they&#x27;re evaluating:<p>- That you&#x27;re able to take ownership of a task and see it to completion<p>- That you can work with the tech stack that the company uses<p>- That you can actually do what you say you can do
ColinWright大约 10 年前
Some interviewers just want to humiliate you and exercise their power over you.<p>Maybe.<p>Personally, I do use questions like this, and I&#x27;m looking for a combination of things.<p>Firstly, how much reading have you done, and how many of these things have you come across before? If you know them all, that tells me you have to hand an arsenal of techniques to bring to bear on a problem, and you care enough to have done considerable outside reading and preparation. That&#x27;s a good sign.<p>Secondly, if there&#x27;s a problem you&#x27;ve not met before, what do you do? Do you freeze? Do you go thoughtful? Do you ask questions to clarify? Do you look to step around the problem? Are you sufficiently confident in yourself to simply get to work, or are you worried that your inability will be seen as an excuse not to hire you?<p>Thirdly, as you start to work on it, what&#x27;s your intuition like? What techniques do you bring to bear? Do you assume there&#x27;s one, right, trick answer, or do you treat this as a challenge to be played with?<p>Finally, how do you react to contributions from others? Do you welcome working together and relish discovering stuff, or do you want to work alone, seeing how you get on?<p>All of these have positive and negative aspects when weighed against a given possible job. What I&#x27;m looking for is that balance between someone who brings new skills and knowledge to the team, and the ability to work with the team, and to have enough in common to be able to communicate effectively. Some people love puzzles, some hate them. Some are great at theoretical analyses, some aren&#x27;t. Some people can devise or adapt algorithms, and some can&#x27;t. A good team needs a balance, and asking these sorts of questions of people is part of finding out their strengths and weaknesses, to see how they&#x27;ll fit in a team.<p>Do you want my advice?<p>Work on your abilities. Be professional in your personal development in whatever area you are interested in, as well as other related areas. Read widely, work on projects, work with people, and expose yourself to technologies outside your comfort zone. When faced with puzzles and problems like these, be yourself. Ask what&#x27;s expected, and work with your interviewer in a professional manner - an interview should be a dialogue. At the end of the interview ask yourself - do I want to work with these people?<p>If they don&#x27;t hire you for who you are and what you bring to the table then you would likely not be a good fit, and would likely not enjoy your work and&#x2F;or the environment. If they offer you the position, you&#x27;ve learned a bit about what they are like to work with, so you are in a position to decide if you want the job.<p>But this is not an ideal world, so you will need to decide what compromises you&#x27;re willing to make.
评论 #9482360 未加载
anon3_大约 10 年前
They&#x27;re a gimmick.<p>Startups in the valley are notorious for following these. It&#x27;s based off the misguided assumption that it equates to a candidate&#x27;s future quality, throughput and they can mold you into any stack.<p>The real value comes from learning algorithms when you can actually apply them. You&#x27;ll real learn things when the time comes - and self-interest in your own software &#x2F; task will keep you engaged enough continue optimizing speed.<p>If you truly were a master at o(n) this, quadratic that and shipped voluminous amounts of code - take that and apply for a quant job.