How to crack a coding interview of biggest tech companies like Google (I did), Facebook, etc?

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@shivamahajan5·
0.000 HBD
How to crack a coding interview of biggest tech companies like Google (I did), Facebook, etc?
This is a 5 step formula that I followed and I tell everyone this only whenever someone asks me. 
Please note that this answer assumes that you want start from scratch.

**Step 1**: Do CS50. There is a catch though. Do it in less than a month. All standard edition Psets and lectures (and shorts if you require) in less than a month.
**Course link**: [CS50 from Harvard](https://www.edx.org/course/introduction-computer-science-harvardx-cs50x#.VLj5w1tlYUU)

**Step 2**: Do algorithms course on coursera by Tim Roughgarden offered by stanford university. Do this according to course's pace. Design and analysis of Algorithms : part 1.
**Course link**: [Algorithms: Design and Analysis, Part 1](https://www.coursera.org/specializations/algorithms)

**Step 3**: Time to enter the world of competitive coding. Start with codechef and spoj. Do atleast 150-175 easy problems which require basic logic within 2-3 months.
Further steps include step 3 running in parallel. You have to continue practicing on codechef and spoj but slowly raising the level of questions to graphs, DP, segment trees, etc.
**Codechef** :[Programming Competition,Programming Contest,Online Computer Programming](https://www.codechef.com/)
**Spoj** :[Sphere Online Judge (SPOJ)](http://www.spoj.com/)
**Problems categories**: [A2 Online Judge](https://a2oj.com/Categories.jsp)

**Step 4**: Do algorithms course which is the sequel of course I listed in step 2. Design and analysis of algorithms: part 2. Do it according to course's pace. Remember step 3 runs in parallel. By the time this course ends you should be somewhere around 300 problems old. ( combined on codechef and spoj)

**Course link**: [Algorithms: Design and Analysis, Part 2](https://www.coursera.org/specializations/algorithms)


**Step 5**: Start doing practice and contests on Codeforces and Topcoder. Try to get in division 1 and more importantly stay there. This step is really important.
[Codeforces](http://codeforces.com/)
[Topcoder](https://www.topcoder.com/)

**PROGRAMMING LANGUAGES:**

Languages I know: C, C++, Python
Question: How to learn them?
Ans: C is taught in almost every college. To learn c++ and other languages there is a very simple technique. The questions that you solve on all these online judges try to do them in the languages yo want to learn.

Question 2: How to do the above tasks if you don't already know the language?
Ans: Google something like **"How to ______ in python/c++/java/etc"**
and if possible look for Stack Overflow links. The ____ can be filled with the following:
* Take user input
* Declare an array
* Sort elements
* Make a hash table or map
* print output.
And whatever you need.

I learnt Python like this and bits of java too. This approach works because once you are done with C language and Harvard CS50 you will know all the concepts and you will be at a stage where you will just need to get used to with the syntax of the language and that can be done while practicing on online judges.

This is what i did. I hope this helps you. I was able to successfully crack internship and full time job offers for companies like **Google (twice: Intern and full time), Amazon (Intern), and Adobe (full time)**.
👍 ,