Posts

Showing posts with the label Google Coding Interview Questions

How should I prepare for my Google interview if I have 1 month left?

Image
  Heading for an extensive on-site interview at Google in just a few weeks but don’t know how to make the most of this time crunch?  As per the  Google interview experienc es  of former candidates, an interview at Google is the ultimate test of your coding skills.  Not just this, Google also assesses the responses of candidates in imaginary workplace scenarios and their behavioral attributes. This helps to determine whether they’ll adapt to the Google work culture or not.  An exhaustive interview preparation plan with a pinch of consistency can work magic for such interviews.  In this article, we’ll be outlining a 30-day interview preparation plan.   We’ll also introduce you to some golden interview tips that will help secure a position at Google. Take a look!  Technical Interview Process At Google  The technical interview round at Google tests your coding and problem-solving skills. It spans across multiple on-site rounds. The inte...

Google Coding Interview Questions

In this article, we will be discussing Google Coding Interview Questions with their solutions. ARRAYS Sum of Two Values Problem Statement: You are given an array of integers and a value, the task is to determine if there exist any two integers in the array whose sum is equal to the given value. Solution: bool find_sum_of_two(vector<int>& A, int val) {   unordered_set<int> found_values;   for (int& a : A) {     if (found_values.find(val - a) != found_values.end()) {       return true;     }     found_values.insert(a);   }   return false; } int main() {   vector<int> v = {5, 7, 1, 2, 8, 4, 3};   vector<int> test = {3, 20, 1, 2, 7};   for(int i=0; i<test.size(); i++){     bool output = find_sum_of_two(v, test[i]);     cout << "find_sum_of_two(v, " ...