Do not read from websites offering codes for standard problems
Understand the algorithm and code it yourself
Participate in coding competitions and read editorials
The IIT tag has helped many a student in India bag coveted jobs at Google, but many non-IITians too have made it to the company straight out of college on the back of their skills rather than campus placements. Vishwas Tripathi, a student of Motilal Nehru National Institute of Technology, went on to join Google not via campus placements but on his own, by focusing on the basics as well as treading the path less followed.
Tripathi posted an answer on popular Q&A website Quora detailing how he prepared, along with the most important things any student should follow while gearing up for such an interview. Below is his account:
Appeared for APAC Round A: Got a call for anti-abuse profile from Google; could not go for interview as it clashed with mid semester exams.
Appeared for APAC Round B: Got a call for software engineer profile.
Researched little bit about Google interview process. Found out you have to explain answers on a whiteboard; bought a whiteboard for practice.
Re-read first five chapters of “Cracking The Coding Interview.” This is most important thing I have ever read about interview process. It has helped me crack the interview of Flipkart, DirectI, Codenation, and Google. These chapters are about interview process and how to handle it.
Always read from good sources. Do not read from websites offering codes for standard problems. Understand the algorithm and code it yourself. If you want to read something new first try to find it on:
“Introduction to Algorithms” by Cormen, Leiserson, Rivest, Stein
Data Science tutorials
Or blogs on Topcoder, Codeforces, CodeChef
Original research paper of algorithm
I love participating in CodeChef long contest, and would recommend it. It gives you ample amount of time to learn something new. Most of the algorithms I know are because of this contest. Spend days in understanding, coding and testing them. You will at least learn one new algorithm every month by giving CodeChef long contest.
Most of us give many coding contests but do not pay attention to most important part of coding contest, the part after contest ends.
Up-solving: Make it a point to solve at-least one more question, after the contest.
Editorials: People give in lot of time to make editorials (CodeChef have best editorials). Read Them. They often have multiple approaches to solve, and links to best sources to read more.
Read codes of red coders, you will find how beautifully and easily can something be coded which took you so long. You will get inspiration to write better code.
Ask: If you have any doubts, ask them. Ask them in relevant threads. Ask them to your friends or seniors who have solved it. This is the fastest way to learn.
Most of all love what you do, and do what you love.
Disclaimer: I got in because of my interest of competitive programming and algorithms, though this is not the only way to get a job. But this answer is focused on entry through competitive programming.