My journey through the Google interview process
Google Coding Interviews are one of the toughest interviews to crack. From the time I found my passion in Competitive coding, my aim was to crack Google Coding Interviews.
Here I am trying to list down the complete process that I went through. It was a 4-month long process and there were a lot of questions that kept on popping in my head from time to time, so I’ll try to answer every such question.
In the first week of February, I got an email from Singapore based Google recruiter mentioning…
These are some problems that I practiced before my Google Interview in a span of 2 weeks.
Write an algorithm to find the kth number such that only prime factors are 3,5 and 7.
This question seems very simple but there is one interesting solution that I am going to explain below:
Let’s maintain 3 queues such that:
Q3: Has previously unseen multiples of 3
Q5: Has previously unseen multiples of 5
Q7: Has previously unseen multiples of 7
To find the minimum we only need to look at the fronts of each queue:
Once we compute y, we need to insert 3y into Q3, 5y into Q5, 7y into Q7. And we only…
I had already mastered DS and Algo and thought to give CTCI a try. I had the opinion what is left for me to study now! Little did I know that this book is going to be one of the most insightful books I could ever read.
I started with the thought “Let’s read the questions and I wouldn’t ever need to turn to the solution”. But guess what? I spent about 25–40 minutes on every question and its solutions that the book has provided. I knew the solution to most of the problems but the solutions in the book…
Inspired by Naval Ravikant
Recently, I have been reading a book called “The Almanack of Naval Ravikant”.
I came across this article that categorises the kind of luck one can have.
The first kind of luck is blind luck where one just gets lucky because something completely out of their control happened. This includes fortune, fate, etc.
Then, there’s luck through persistence, hard work, hustle, and motion. This is when you’re running around creating opportunities. You’re generating a lot of energy, you’re doing a lot to stir things up. It’s almost like mixing a petri dish or mixing a bunch…
I am working as a Software Engineer for the past 2 years and I have cracked Google interview.
How I started my journey?
I am from a Tier 1 institute of India, I started coding in my 2nd year of college and learnt it on my own. I was among the top coders from my college.
For the past 1 year, I have been very much active on Codeforces that helped me crack interviews at Google and Flipkart.
How I can help you?
I am trying to build a community of coders where in:
Rock, Paper, Scissors
There are 2 players Alice and Bob, who are playing Rock, Paper and Scissors game. Alice can pick rock ‘a’ times, scissors ‘b’ times and paper ‘c’ times. Similarly, Bob can pick rock ‘x’ times, scissors ‘y’ times and paper ‘z’ times.
Note: The ordering given in the question is RSP and not RPS
We need to find what is the minimum and maximum number of times that Alice can win.
Solution and Approach
Let’s first find the maximum number of times that Alice can win.
Alice will win only when Bob loses. And Bob…
I got an offer from Flipkart for the SDE1 post. Here I am trying to explain the question and my proposed solution for the Machine Coding Round.
The question was explained to all the interviewees together and then we had to code for 2 hours and our screens were monitored.
Watch this video of full explanation of code.
One of the core problems which people face at every company is the unavailability of conference rooms. So we thought of building one conference room management system. The system should have the following features.
I interviewed with GS in January 2021 for the post of Java/Python Developer. There were 5 rounds in total.
Interview Questions Based on DS & Algo
Q2. https://www.geeksforgeeks.org/detect-loop-in-a-linked-list/ with an explanation of the proof.
Q4. Given n number of cars with varying speeds, speed is given in a form of an array of integers. Initially, all the cars are placed at the starting point and they have to reach the ending point. We need to calculate the total number of overtakes that will happen till all the cars reach the final destination. https://www.geeksforgeeks.org/counting-inversions/
The following are some of the channels I found really insightful during my preparation for interviews of various companies, including Google.
His videos for various algorithms made me understood the most complex problems which I was never able to understand.
One such problem was the KMP algorithm. I have tried to understand this algorithm from every possible resource but never understood it very clearly. Watching this video twice I was able to understand the basic logic for this algorithm.
One more such video was Median of 2 sorted arrays using Binary Search.
The guru for all the folks who want…