Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I was interviewed before May 2023.
Array string questions
Dsa mostly from arrays,trees.
posted on 6 Oct 2024
Asked single que which is dp
What people are saying about Google
Topics : Trees, graphs
Google interview questions for designations
I applied via LinkedIn and was interviewed in Jul 2023. There were 2 interview rounds.
Get interview-ready with Top Google Interview Questions
I applied via Approached by Company and was interviewed before Jun 2023. There were 2 interview rounds.
Two coding questions to be done
I applied via Approached by Company and was interviewed before Jan 2023. There were 3 interview rounds.
Swap two numbers with any of the language
Discuss about your family members
A software intern developer is a student or recent graduate who works on software development projects under the guidance of experienced developers.
Assists in coding, testing, and debugging software applications
Learns new programming languages and technologies
Participates in team meetings and contributes to project discussions
I was interviewed in Feb 2021.
Round duration - 60 minutes
Round difficulty - Easy
Given 'N' subjects, each containing a certain number of problems, and 'K' friends, assign subjects to friends such that each subject goes to exactly one friend, maintain...
We want to assign N number of subjects among K friends. So consider this as dividing the array into K partitions, where each partition denotes the subjects assigned to one of the friends. Assume that we already have K-1 partitions i.e. we have already assigned the subjects to K-1 friends, and now we want to do the K th partition. So, this last divider can be put between i th and i+1 th subject for 1<=i<...
Given an array of integers, determine the sum of bit differences among all possible pairs that can be formed using the elements of the array.
The b...
O(1)
No extra space is required.
Time Complexity: O(n^2)Explanation:O(N^2), where ‘N’ is the number of elements in the given integer array.
We have to run two nested loops to get every pair that can be formed using the given array ele...
Round duration - 60 minutes
Round difficulty - Medium
Given an integer 'N', calculate and print the sum of the least common multiples (LCM) for each integer from 1 to N with N.
The sum is represented as:LCM(1, N) + LCM(2, N) + ....
Using the mathematical formula, A*B = LCM(A,B) * GCD(A,B) where ‘A’ and ‘B’ are the two integers, and GCD(A,B) denotes the Greatest common divisor of ‘A’ and ‘B’.
For example, suppose
A = 20 and B = 30
Factors of A = {1,2,4,5,10,20}
Factors of B = {1,2,3,5,6,10,15,30}
The greatest common factor is 10, hence GCD(20,30) = 10.
So LCM(A,B) = A*B / GCD(A,B)
All we need to fin...
Given a 9x9 Sudoku board, your task is to fill the empty slots and return the completed Sudoku solution.
A Sudoku is a grid composed of nine 3x3 smaller grids. The challenge is to fill in the...
Our approach here will be to check for each empty slot that filling it with which number will not violate any constraint. We will start from the first block and keep on checking for each block using recursion. Consider a function SOLVESUDOKU for this, that accepts as a parameter an ArrayList ARR and do:
Round duration - 60 minutes
Round difficulty - Hard
Given a singly linked list of integers and a reference to a node, your task is to delete that specific node from the linked list. Each node in the linked li...
Approach:
We need to delete the node K from the linked list. The most general way to delete the node K from a singly linked list is to get access to the previous node of K. We can get access to the previous node by traversing from the head of the linked list. Let’s denote this previous node as P. Then, we update the next pointer of P to the next pointer of K.
Although the reference to node K is giv...
Round duration - 60 Minutes
Round difficulty - Easy
Timing was around 3 pm.
Given an array ARR
consisting of N
integers, your goal is to determine the maximum possible sum of a non-empty contiguous subarray within this array.
We will iterate through all possible boundaries of the subarrays in the given array with the help of two nested loops.
Then, we will iterate through each subarray with the help of another loop and find the sum of the subarray. We will maintain the maximum subarray sum through our iterations and finally return it.
Space Complexity: O(1)Explanation:O(1), constant space is used.
Time Complexity: O(n^3...Tip 1 : Practice on white board
Tip 2 : Spend daily some time
Tip 3 : Practice previous questions
Tip 1 : Resume should be short and neat
Tip 2 : Keep only thing in which you are sure you will answer all questions
I was interviewed in Feb 2021.
Round duration - 30 minutes
Round difficulty - Medium
This round was to test if Google should spend time in interviewing me or not. I was asked around 8 questions that any coder must know, like time complexities of various algorithms, basic understanding of trees and graphs, some concepts specific to the chosen language etc. Apart from these, there was a question to test my mental arithmetic that can be important for system design interviews.
This round went pretty well for me and I moved to the next Round.
Given a binary tree with N
nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true
; otherwise, return false
.
A binary search tree (BST)...
Round duration - 45 minutes
Round difficulty - Hard
This round was to test my coding aptitude. It was a 45 minutes round and I was asked 2 questions. One of the questions was based on Dynamic Programming and the other question was on Arrays that involved usage of Heaps. I was able to approach both the problems but could code only one due to time constraints. The interviewer was pretty friendly and quite helping. She guided me wherever I went wrong.
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make...
Tip 1 : Regular practice on online platforms
Tip 2 : Must do questions from geeksforgeeks.org are very helpful
Tip 3 : Experience in some team projects is a plus point
Tip 1 : Mention good projects in resume
Tip 2 : Team projects will help a lot
I was interviewed in Oct 2020.
Round duration - 60 minutes
Round difficulty - Medium
Given a positive integer N
, your task is to determine the minimum number of steps required to reduce N
to 1.
1) Subtract 1 from it: n = n -...
Round duration - 100 minutes
Round difficulty - Medium
My interview was held from 3 to 3:50 and 4 to 4:50 in the evening . I sat in a silent place of my room with no disturbances in my room.
The interviewer first asked me to introduce myself then he did the same, he then gave me a problem of sliding window and we discussed to reach on a optimal solution then I wrote the code for it . Then he asked me to ask if I had any questions , I asked some questions regarding their work culture , what do they expect from me and what work will I be given there as an SDE -intern. Second interview was almost the same the problem was of dynamic programming .
You are given an array/list of integers with length 'N'. A sliding window of size 'K' moves from the start to the end of the array. For each of the 'N'-'K'+1 possi...
Round duration - 50 minutes
Round difficulty - Medium
I have already given the description in the previous round.
Given an array "arr" consisting of "N" integer elements, your task is to remove "K" elements from the beginning or the end of the array. You must return the ma...
Tip 1 : Solve as many questions and learn as many concepts as you can from gfg and leetcode.
Tip 2 : Solve the questions on notepad or notebook because there you won't get an editor to point out your mistakes.
Tip 3 : Submit your code when you are completely satisfied because there you won't get to run and debug your code.
Tip 1 : Keep it 1 page short and catchy.
Tip 2 : Do not brag in your Resume your resume should be honest and should represent exactly what you are.
I was interviewed in Oct 2020.
Round duration - 60 minutes
Round difficulty - Easy
Timing: Between 3-5 pm we could take the test anytime
The test environment was hackerrank. Great user interface and I did not suffer anyt problems.
There was no interviewer as it was coding test.
There were 2 coding questions asked.
You are given an array/list ARR
of N
positive integers. Your task is to determine the size of the smallest subset that achieves the maximum possible OR value among all subsets.
Given a dictionary D
with N
words, each of a fixed length L
and consisting only of lowercase English alphabets, answer Q
queries. Each query consists of a word W
of the ...
Round duration - 45 minutes
Round difficulty - Medium
Timing was late at night ie 9:30 PM for this round.
The environment was nice. It was on Google meet.
The interviewer was very friendly and explained the question well
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the ...
Tip 1 : Prepare core concepts well
Tip 2 : Practice medium level and hard questions
Tip 1 : Put good projects and experiences.
Tip 2 : Generally, don't put any false things on resume.
based on 8 interviews
2 Interview rounds
based on 2 reviews
Rating in categories
Software Engineer
1.7k
salaries
| ₹19 L/yr - ₹77.5 L/yr |
Software Developer
1.1k
salaries
| ₹20.1 L/yr - ₹60 L/yr |
Senior Software Engineer
666
salaries
| ₹24 L/yr - ₹85.4 L/yr |
Data Scientist
274
salaries
| ₹12 L/yr - ₹50 L/yr |
Sde1
257
salaries
| ₹14 L/yr - ₹55 L/yr |
Yahoo
Amazon
Microsoft Corporation