Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Dsa mostly from arrays,trees.
posted on 6 Oct 2024
Asked single que which is dp
Topics : Trees, graphs
What people are saying about Google
I applied via LinkedIn and was interviewed in Jul 2023. There were 2 interview rounds.
Google interview questions for designations
I applied via Approached by Company and was interviewed before Jun 2023. There were 2 interview rounds.
Two coding questions to be done
Get interview-ready with Top Google Interview Questions
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 before May 2023.
Array string questions
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
based on 8 interviews
2 Interview rounds
based on 2 reviews
Rating in categories
Software Engineer
1.8k
salaries
| ₹19 L/yr - ₹77.3 L/yr |
Software Developer
1.1k
salaries
| ₹20.6 L/yr - ₹60 L/yr |
Senior Software Engineer
640
salaries
| ₹24 L/yr - ₹85 L/yr |
Data Scientist
268
salaries
| ₹24.3 L/yr - ₹55.5 L/yr |
Sde1
257
salaries
| ₹14 L/yr - ₹55 L/yr |
Yahoo
Amazon
Microsoft Corporation