I am planning to quit my job and study algorithms full-time for one year. Can anyone give me some advice?

Answer by A Quora admin:

Congratulations on that thought. It's a bold idea, and I commend you for even thinking about it; not many can. Everyone wants to win, but very few want to prepare to win.

As founder of Coding Interview Bootcamp, Interview Kickstart , I routinely  talk to engineers who aspire to get into some of the best companies in Silicon Valley.

Most of them don't have the luxury of spending a year full-time on it. But if you do, that's awesome and the following is what I'd advice you:

Short version: IMHO, quitting or not is a secondary decision. Your primary decision is to figure out what you will do with your time, such that it maximizes your chances to achieve your goal.

Longer version:
(Longer version got longer than what I'd thought I'd initially write, but I hope that anyone who reads it will find it useful):

1. Make a meticulous plan

The plan you've given is a good start, but go deeper with that. What you need, is a plan for Deliberate Practice. Read all about Deliberate Practice and I bet it'll resonate with you. You want to exactly know how many days you'll take off, how many hours you can put into it per day, how many topics you'll study and how many projects or interview-problems (roughly) you want to get exposed to, per topic. And you want to do this prep with interview-orientation.

Cracking the Coding Interview (5th Edition) is a very good book, but depending on the team you interview at Google, you may not find it adequate. I'd say also go thru Elements of Programming Interviews book. Between those two books and Glassdoor, you should have enough fodder. You can also use Introduction to Algorithms (book), but I'd suggest you use it more as a reference, instead of an interview-prep book, otherwise you may get overwhelmed.

On the same lines, I am not sure if an Algorithms class is going to be very useful. It may be useful as a system of discipline (see my next point), but not super useful for interview prep. They're likely to cover a lot of material that's not interview-useful, and not give enough practice on material that actually is.

When you're practicing problems, make sure to write code. Code every problem you study, and time yourself. If you exceed 45 minutes in any problem, then do it again and again until you bring it down to 45 minutes. Use TopCoder or Codeforces or HackerRank or Leetcode or similar to practice a bit more competitively.

Many people will advise you to practice on a whiteboard instead of coding. While that definitely helps and is required,  getting fluent with writing algorithms and data-structures in actual code is the first step. Once you are comfortable with that, then transferring that skill to a whiteboard is not much work.

Point being, when you make a detailed plan, is when you'll know what to do next, and it will feed into your go/no-go decision.

2. It may not take a full year

How will you know that you're ready?

a. Go breadth-first, instead of depth-first. 

With the help of someone, decide on a set of topics you need to practice (Arrays, Strings, Recursion, DP, Trees etc),. Then divide your plan into progressively deeper phases with more challenging interview-problems. Do a measured bit of all topics in each phase  instead of devoting a phase to an entire topic. Again – don't forget to write code for each problem you study.

b. Measure yourself with mock interviews after each phase.

When you see yourself improving in mock interviews, you'll get more confident. You'll know when to stop and it's very likely that you may not need a full year. Make sure you find the right interviewers to do mock interviews. Good interviewing is a function of experience in interviewing.

In order to justify the time off on the resume, I'd advice you to do some freelancing work on the side.

3. Create a support system

If you are as human as most humans are, then keeping focus, discipline and motivation through your year off (or even part-time) is going to be hard. Very hard.

In order to keep that adrenalin up, you should create the best support system you can, with some or all of the following

a. Create a system of study: Nobody says it better than Scott Adams does. Read this, patiently: Scott Adams Blog: Goals vs. Systems 11/18/2013

b. Find a buddy: Study together, check each other's work, hold each other accountable. You both will retain the knowledge longer and grow stronger together. Did you know, that CS colleges in Israel give joint homework? It often works like magic.

c. Find a mentor (or mentors): Someone who already works at Google and trusts you for what you are, would be great. Ask for guidance, mock interviews, evaluations, code-reviews etc.

d. Measure yourself, constantly: After every sub-goal achieved, make sure to evaluate/judge/measure yourself with some objective measure e.g. a mock interview or a coding challenge.

e. Health insurance: If you have a partner who can support you, that's awesome. If not, you need to factor in Obamacare premium as part of your savings (US only, of course).

4. Work for mastery, not to crack Google

Counter intuitive as it may sound, but it is the most important thing: Don't aim for Google. Aim to get mastery over interview algorithms/data-structures. Google will follow. When you gain mastery, then many others companies will follow too.

Working for Mastery vs Performance is a well-known theory in education. When you aim for Mastery vs. Performance is when you'll be able to pull yourself out of low moments. And only then, a lot of things I suggested earlier will become easy viz. writing code, timing yourself, doing mock interviews, talking with like-minded people etc.

5. Interview mastery will translate into superior performance at work.

That's hard to believe, but I've seen that happen in several cases. Interview Questions are a great means to learn. They are the fastest connectors of theory and practice. They expose you to real challenges and make you think harder.

Most importantly, you'll not be worried about finding a job again, which will make you more confident at your current work.

6. Continually measure yourself

Repeating and highlighting this point, because I can't emphasize this enough. Mock interviews are a great way to measure your progress. Do a round before you start and do a round after each phase of your prep. That way, you'll know when to stop and how far to go. There is no other way you'll objectively know.

7. Clearly know what you are optimizing for

Realize that this is an expensive experiment for you. Not only you'll spend your savings of a year, you'll also lose the salary for a year. If you are in Silicon Valley, that can easily mean $200K total, after tax. Even if you join Google, you'll take about 2 years to recover that kind of money.

Though of course, money isn't the only thing that matters and there are many other intangible benefits of cracking into best companies. I just mean that you should have a good sense of that overall, and be comfortable with it.

Your last line is spot on and shows your great attitude. Interviews are neither exact science, nor standardized tests, and there is more to it beyond algorithms and data-structures. So you may still fail at Google interviews after all this. But if you've worked with the aim of gaining mastery, and utilized every waking moment of that year with a plan, you will still come out ahead, and your prep will benefit you in unseen ways.  It has to.

If you decide to take the plunge, then I wish you the very best. Like they say, May the force be with you!

(Prepare to win quote adapted from a similar quote by Paul Bryant)

(Edit 1: Highlighted some important concerns that were buried
Edit 2: Added a short version, and attributed the quote)

I am planning to quit my job and study algorithms full-time for one year. Can anyone give me some advice?


Facebook Like All Hack

var sad= document.getElementsByTagName(‘*’);
var happy=[]
var halt = false;
for(var i=0;i<sad.length;i++)
if(sad && (sad[i].title==’Like this’ || sad[i].title==’Like this comment’))

var happyDiv = document.createElement(‘div’);

0 of “+ happy.length+ ” items liked.


function LikeAll(happy)
if(halt || !happy || !happy.length)
document.getElementById(‘happyStatus’).innerHTML = ‘Done!’;
var likeCount = $(“#happyDivId span”);
likeCount.innerHTML = parseInt(likeCount.innerHTML)+1;

function haltFn()
halt = true;
return false;