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.

Before <strong>the</strong> <strong>Interview</strong> | Technical Preparation<br />

How to Prepare for Technical <strong>Questions</strong><br />

You’ve purchased this book, so you’ve already gone a long way towards good preparation.<br />

Nice work!<br />

That said, <strong>the</strong>re are better <strong>and</strong> worse ways to prepare. Many c<strong>and</strong>idates just read through<br />

problems <strong>and</strong> solutions. Don’t do that! Memorizing or trying to learn specific questions<br />

won’t help you! Ra<strong>the</strong>r, do this:<br />

1. Try to solve <strong>the</strong> problem on your own. I mean, really try to solve it. Many questions<br />

are designed to be tough - that’s ok! When you’re solving a problem, make sure to<br />

think about <strong>the</strong> space <strong>and</strong> time efficiency. Ask yourself if you could improve <strong>the</strong> time<br />

efficiency by reducing <strong>the</strong> space efficiency, or vice versa.<br />

2. Write <strong>the</strong> code for <strong>the</strong> algorithm on paper. You’ve been coding all your life on a computer,<br />

<strong>and</strong> you’ve gotten used to <strong>the</strong> many nice things about it. But, in your interview,<br />

you won’t have <strong>the</strong> luxury of syntax highlighting, code completion, or compiling.<br />

Mimic this situation by coding on paper.<br />

3. Type your paper code as-is into a computer. You’ll probably have made a bunch of<br />

mistakes. Start a list of all <strong>the</strong> mistakes you made, so that you can keep <strong>the</strong>se in mind<br />

in <strong>the</strong> real interview.<br />

4. Do a mock interview. CareerCup offers a mock interview service, or you can grab a<br />

friend to ask you questions. Though your friend may not be an expert interviewer, he<br />

or she may still be able to walk you through a coding or algorithm question.<br />

2 5<br />

<strong>Cracking</strong> <strong>the</strong> <strong>Coding</strong> <strong>Interview</strong>

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

Saved successfully!

Ooh no, something went wrong!