Recent Google Interview Questions

Review this list of 867 Google interview questions and answers verified by hiring managers and candidates.
  • Google logoAsked at Google 
    +5

    " from typing import List def least_interval(tasks: List[str], n: int) -> int: pass # your code goes here if n == 0: return len(tasks) dictionary = {} total_sum = len(tasks) output = 0 for t in tasks: if t in dictionary: dictionary[t] += 1 else: dictionary[t] = 1 dictLen = len(dictionary) while total_sum > 0: for key in dictionary.keys(): if dictionary[key] > 0: "

    Anonymous Quail - " from typing import List def least_interval(tasks: List[str], n: int) -> int: pass # your code goes here if n == 0: return len(tasks) dictionary = {} total_sum = len(tasks) output = 0 for t in tasks: if t in dictionary: dictionary[t] += 1 else: dictionary[t] = 1 dictLen = len(dictionary) while total_sum > 0: for key in dictionary.keys(): if dictionary[key] > 0: "See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +1 more
  • Google logoAsked at Google 

    "untuk mengurutkan daftar angka secara efisien saya akan menggunakan aplikasi pengolah angka yaitu excel dengan rumus rumus untuk mempermudah dan mempercepat pengurutan daftar angka"

    Isnadea soraya R. - "untuk mengurutkan daftar angka secara efisien saya akan menggunakan aplikasi pengolah angka yaitu excel dengan rumus rumus untuk mempermudah dan mempercepat pengurutan daftar angka"See full answer

    Machine Learning Engineer
    Analytical
  • Google logoAsked at Google 
    Machine Learning Engineer
    Data Structures & Algorithms
    +1 more
  • Google logoAsked at Google 
    Machine Learning Engineer
    Behavioral
  • Google logoAsked at Google 

    "i use google frequently, but most of the time i use for syntax and terms which i dont undestand, google is my go to guy."

    Ankit R. - "i use google frequently, but most of the time i use for syntax and terms which i dont undestand, google is my go to guy."See full answer

    Machine Learning Engineer
    Behavioral
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Machine Learning Engineer
    Concept
    +1 more
  • Google logoAsked at Google 

    "Hey Grandma, you've had a lot of experience with infants, haven't you? When they were babies, you taught them how to chew in their first six months. This initial phase is like giving them data. Once they learned how to chew, they could handle any food you gave them. Next, you refined their learning by teaching them that they should only chew on food. This is like refining the data so they understand what is relevant. Then, a few months later, they started crawling and walking, learning by observ"

    Hari priya K. - "Hey Grandma, you've had a lot of experience with infants, haven't you? When they were babies, you taught them how to chew in their first six months. This initial phase is like giving them data. Once they learned how to chew, they could handle any food you gave them. Next, you refined their learning by teaching them that they should only chew on food. This is like refining the data so they understand what is relevant. Then, a few months later, they started crawling and walking, learning by observ"See full answer

    Machine Learning Engineer
    Concept
  • Google logoAsked at Google 
    +3

    "static TreeNode buildTree(int] preorder, int[] inorder) {//[2, 4, 5 if(preorder.length==0 || preorder.length!=inorder.length) { isNull=true; return null; } int parentElem=preorder[0];//2 int index=-1; index=binarySearch(inorder, parentElem);//3 //1 if(index==-1) { isNull=true; return null; } TreeNode root=new TreeNode(parentElem); int preOrder=0; int ind=-1; if(index>0) { int[] leftInOrder=Arrays.copyOfRange(inorder, 0, index); //[4, 2, 5]//[4] ind=binarySearch(preorder, inorder[index"

    Divya R. - "static TreeNode buildTree(int] preorder, int[] inorder) {//[2, 4, 5 if(preorder.length==0 || preorder.length!=inorder.length) { isNull=true; return null; } int parentElem=preorder[0];//2 int index=-1; index=binarySearch(inorder, parentElem);//3 //1 if(index==-1) { isNull=true; return null; } TreeNode root=new TreeNode(parentElem); int preOrder=0; int ind=-1; if(index>0) { int[] leftInOrder=Arrays.copyOfRange(inorder, 0, index); //[4, 2, 5]//[4] ind=binarySearch(preorder, inorder[index"See full answer

    Software Engineer
    Data Structures & Algorithms
    +2 more
  • Google logoAsked at Google 
    Machine Learning Engineer
    Machine Learning
  • +1

    "CQ: Goal - connect two large continents, reduce the distance Is it a motorable bridge -? Any specific use case on mind? Summarise: come up with the use cases of the bridge Google’s mission -> organise world’s information and make them more accessible and useful A bridge that way is a great way to reduce the distance between two large separate continents. This bridge can help spread information faster Possible Use cases of the bridge: Transportation of physical goods: Since road tran"

    Anonymous Newt - "CQ: Goal - connect two large continents, reduce the distance Is it a motorable bridge -? Any specific use case on mind? Summarise: come up with the use cases of the bridge Google’s mission -> organise world’s information and make them more accessible and useful A bridge that way is a great way to reduce the distance between two large separate continents. This bridge can help spread information faster Possible Use cases of the bridge: Transportation of physical goods: Since road tran"See full answer

    Product Manager
    Product Strategy
  • +8

    "Clarifying questions: What city/ country are we talking about? Indian metro. What all counts as a grocery store? Do have to cover dark stores as well which are not open to public? Only consider all grocery stores where public pick up is allowed. Do we have to include hyper markets/ super markets as well or only smaller stores? Include both. Okay, so I would be considering the Indian metro of Bangalore here. The overall equation is , **total number of grocery stores = Number of small grocer"

    Kartikeya N. - "Clarifying questions: What city/ country are we talking about? Indian metro. What all counts as a grocery store? Do have to cover dark stores as well which are not open to public? Only consider all grocery stores where public pick up is allowed. Do we have to include hyper markets/ super markets as well or only smaller stores? Include both. Okay, so I would be considering the Indian metro of Bangalore here. The overall equation is , **total number of grocery stores = Number of small grocer"See full answer

    Product Manager
    Estimation
  • Google logoAsked at Google 

    "Situation: As a Product Manager at Cisco, I was leading the development of a new highly critical product for enterprise customers. Midway through the project, a key engineering team was reassigned due to an urgent security patch, leaving us understaffed with only six weeks left before a critical customer pilot. Task: I had to ensure the product launched on time without sacrificing key features, despite losing half of our engineering team. The challenge was to"

    fuzzyicecream14 - "Situation: As a Product Manager at Cisco, I was leading the development of a new highly critical product for enterprise customers. Midway through the project, a key engineering team was reassigned due to an urgent security patch, leaving us understaffed with only six weeks left before a critical customer pilot. Task: I had to ensure the product launched on time without sacrificing key features, despite losing half of our engineering team. The challenge was to"See full answer

    Software Engineer
    Behavioral
  • Google logoAsked at Google 
    Software Engineer
    System Design
    +1 more
  • Google logoAsked at Google 
    +6

    " function climbStairs(n) { // 4 iterations of Dynamic Programming solutions: // Step 1: Recursive: // if (n <= 2) return n // return climbStairs(n-1) + climbStairs(n-2) // Step 2: Top-down Memoization // const memo = {0:0, 1:1, 2:2} // function f(x) { // if (x in memo) return memo[x] // memo[x] = f(x-1) + f(x-2) // return memo[x] // } // return f(n) // Step 3: Bottom-up Tabulation // const tab = [0,1,2] // f"

    Matthew K. - " function climbStairs(n) { // 4 iterations of Dynamic Programming solutions: // Step 1: Recursive: // if (n <= 2) return n // return climbStairs(n-1) + climbStairs(n-2) // Step 2: Top-down Memoization // const memo = {0:0, 1:1, 2:2} // function f(x) { // if (x in memo) return memo[x] // memo[x] = f(x-1) + f(x-2) // return memo[x] // } // return f(n) // Step 3: Bottom-up Tabulation // const tab = [0,1,2] // f"See full answer

    Data Engineer
    Data Structures & Algorithms
    +3 more
  • Google logoAsked at Google 

    "def split_count(s): return 2**(len(s)-1) `"

    Steve M. - "def split_count(s): return 2**(len(s)-1) `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Google logoAsked at Google 
    Software Engineer
    Behavioral
    +1 more
  • Google logoAsked at Google 
    +32

    "Reversing a linked list is a very popular question. We have two approaches to reverse the linked list: Iterative approach and recursion approach. Iterative approach (JavaScript) function reverseLL(head){ if(head === null) return head; let prv = null; let next = null; let cur = head; while(cur){ next = cur.next; //backup cur.next = prv; prv = cur; cur = next; } head = prv; return head; } Recursion Approach (JS) function reverseLLByRecursion("

    Satyam S. - "Reversing a linked list is a very popular question. We have two approaches to reverse the linked list: Iterative approach and recursion approach. Iterative approach (JavaScript) function reverseLL(head){ if(head === null) return head; let prv = null; let next = null; let cur = head; while(cur){ next = cur.next; //backup cur.next = prv; prv = cur; cur = next; } head = prv; return head; } Recursion Approach (JS) function reverseLLByRecursion("See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Google logoAsked at Google 

    "i am a fresher"

    Akash A. - "i am a fresher"See full answer

    Software Engineer
    Behavioral
  • Google logoAsked at Google 
    Product Manager
    Product Design
  • +1

    "Clarifying questions We are referring to Facebook here within Meta products, correct?: Yes Can we base the CAC as of 2025?: yes Facebook acquires users through multiple channels, are we focussed on any particular channel? : We are looking at an overall CAC for Facebook What all do we want to include in CAC? Can we limit it to the marketing and advertising costs and leave aside technical, infrastructure or people costs?: yes Here’s how I will calculate this. **Customer acquisition c"

    Kartikeya N. - "Clarifying questions We are referring to Facebook here within Meta products, correct?: Yes Can we base the CAC as of 2025?: yes Facebook acquires users through multiple channels, are we focussed on any particular channel? : We are looking at an overall CAC for Facebook What all do we want to include in CAC? Can we limit it to the marketing and advertising costs and leave aside technical, infrastructure or people costs?: yes Here’s how I will calculate this. **Customer acquisition c"See full answer

    Product Manager
    Estimation
Showing 181-200 of 867