27.10.2014 Views

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

Cracking the Coding Interview, 4 Edition - 150 Programming Interview Questions and Solutions

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

At <strong>the</strong> <strong>Interview</strong> | Top Ten Mistakes C<strong>and</strong>idates Make<br />

#6 | Talking Too Little<br />

Psst - let me tell you a secret: I don’t know what’s going on in your head. So if you aren’t talking,<br />

I don’t know what you’re thinking. If you don’t talk for a long time, I’ll assume that you<br />

aren’t making any progress. Speak up often, <strong>and</strong> try to talk your way through a solution. This<br />

shows your interviewer that you’re tackling <strong>the</strong> problem <strong>and</strong> aren’t stuck. And it lets <strong>the</strong>m<br />

guide you when you get off-track, helping you get to <strong>the</strong> answer faster. And it shows your<br />

awesome communication skills. What’s not to love?<br />

#7 | Rushing<br />

<strong>Coding</strong> is not a race, <strong>and</strong> nei<strong>the</strong>r is interviewing. Take your time in a coding problem - don’t<br />

rush! Rushing leads to mistakes, <strong>and</strong> reveals you to be careless. Go slowly <strong>and</strong> methodically,<br />

testing often <strong>and</strong> thinking through <strong>the</strong> problem thoroughly. You’ll finish <strong>the</strong> problem in less<br />

time in <strong>the</strong> end, <strong>and</strong> with fewer mistakes.<br />

#8 | Not Debugging<br />

Would you ever write code <strong>and</strong> not run it or test it? I would hope not! So why do that in an<br />

interview? When you finish writing code in an interview, “run” (or walk through) <strong>the</strong> code to<br />

test it. Or, on more complicated problems, test <strong>the</strong> code while writing it.<br />

#9 | Sloppy <strong>Coding</strong><br />

Did you know that you can write bug-free code while still doing horribly on a coding question?<br />

It’s true! Duplicated code, messy data structures (i.e., lack of object oriented design),<br />

etc. Bad, bad, bad! When you write code, imagine you’re writing for real-world maintainability.<br />

Break code into sub-routines, <strong>and</strong> design data structures to link appropriate data.<br />

#10 | Giving Up<br />

Have you ever taken a computer adaptive test? These are tests that give you harder questions<br />

<strong>the</strong> better you do. Take it from me - <strong>the</strong>y’re not fun. Regardless of how well you’re actually<br />

doing, you suddenly find yourself stumbling through problems. Yikes!<br />

<strong>Interview</strong>ing is sort of like this. If you whiz through <strong>the</strong> easy problems, you’re going to get<br />

more <strong>and</strong> harder problems. Or, <strong>the</strong> questions might have just started out hard to begin with!<br />

Ei<strong>the</strong>r way, struggling on a question does not mean that you’re doing badly. So don’t give up<br />

or get discouraged. You’re doing great!<br />

CareerCup.com<br />

4 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!