Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Multiple data structures are used to print nodes in a specific order. One data structure cannot be used alone.
The given order suggests a depth-first search traversal of a tree-like structure.
A stack can be used to keep track of the nodes to be visited.
A queue can be used to store the children of a node in the order they are visited.
An array can be used to store the nodes in the required order.
A linked list can be used ...
Find largest pen using minimum comparisons with tops.
Divide pens into two groups and compare largest pen from each group with largest top.
Repeat the process with the group containing the largest pen until only one pen is left.
The remaining pen is the largest pen.
Total number of comparisons required is 2n-3.
Given n dice with 'a' sides and sum b, return no. of ways to obtain b. Optimize time and space complexity.
Use dynamic programming to reduce time complexity
Create a 2D array to store the number of ways to obtain each sum for each number of dice
Use rolling arrays to optimize space complexity
Example: n=2, a=6, b=7 -> 6 ways to obtain sum 7
Example: n=3, a=4, b=8 -> 21 ways to obtain sum 8
Sort 128 GB data on 2 machines with 64 GB RAM each. Extend to 1000 machines.
Use external sorting algorithm like merge sort or quick sort
Divide data into smaller chunks and sort them individually
Merge sorted chunks using additional RAM
For 1000 machines, use distributed sorting algorithms like MapReduce or Hadoop
Ensure data consistency and fault tolerance in distributed sorting
What people are saying about Google
Some of the top questions asked at the Google interview for freshers -
The duration of Google interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 101 interviews
Interview experience
based on 1.7k reviews
Rating in categories
Bangalore / Bengaluru
3-7 Yrs
Not Disclosed
Software Engineer
1.8k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
1.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
680
salaries
| ₹0 L/yr - ₹0 L/yr |
Data Scientist
274
salaries
| ₹0 L/yr - ₹0 L/yr |
Sde1
257
salaries
| ₹0 L/yr - ₹0 L/yr |
Yahoo
Amazon
Microsoft Corporation