Tip 1 : Try to cover as many different patterns of questions as you can, if you get unlucky you can even be asked questions related to geometry or segment trees! Obviously, there were other sources as well but this is quite a good amount
Tip 2 : I tried to complete as many googles tagged questions as I could. I used to sort questions by frequency and do questions that had bar colors of green and yellow. Maintain a notebook to note down questions that you are not able to do on your own and try them again after 2-3 weeks.
Tip 3 : Coding cleanly and at speed are also important. Write modular code otherwise, that would be a negative comment for you! I would recommend to try written practice 10 days before the interview so that you have a good hands-on
Tip 1 : Good experience
Tip 2 : Google mainly focuses on logic and how you are coming up with a solution. It notes down each and every small mistake. Interviewers are really very helpful. They expect clear code with the optimal approach
Discussion and problem solving. Tell me something about yourself.



Problem solving



In the below binary tree :
The duplicate subtrees are {{2, 3}, {3}} and we have to just return the root values of each duplicate subtree, so the output is {2, 3}.



In the above image, areas in green, red, and violet color are all submatrices of the original 4x4 matrix.
1. Binary valued matrix has only two values in each cell : 0 and 1.
2. A submatrix is a matrix formed by selecting certain rows and columns from a larger matrix.
3. The area of a matrix with 'h' rows and 'w' columns is equal to 'h' * 'w'.




Consider the above example, if we break the tree by removing the edge between nodes that has integers 5 and 6 then we get the maximum product of the sum of integers on nodes i.e. ( (6 + 4 + 1) * (5 + 1 + 3 + 2) ) = 121.
The answer may be very large so, you have to take the modulo with 10^9 + 7.



The start time of one job can be equal to the end time of another.



Two modifications are performed on binary search logic.
1) instead of sorted array, unsorted array has been given
2) Mid element is decided based on random function. Now we have to find out numbers from given array for which this function gives true result.
Hint: Function will return true for value x, if all numbers on left side of x are small and all number on the right side of x are greater.
Example: [ 4, 3, 1, 5, 7, 6, 10]
Ans: 5, 10
Time Complexity: O(n)
Space Complexity: O(n)



The traversal should proceed from left to right according to the input adjacency list.
Adjacency list: { {1,2,3},{4}, {5}, {},{},{}}
The interpretation of this adjacency list is as follows:
Vertex 0 has directed edges towards vertices 1, 2, and 3.
Vertex 1 has a directed edge towards vertex 4.
Vertex 2 has a directed edge towards vertex 5.
Vertices 3, 4, and 5 have no outgoing edges.
We can also see this in the diagram below.
BFS traversal: 0 1 2 3 4 5



For the given if N = ā5ā, āSWEETā = [1,3,6,7,2] and āEXPIRY = [10,7,2,6,4].
And the query is āXā=2 and āYā =6 ,then the number of sweets satisfying the condition is only 1 (having sweetness 3 and expiry date 7).



Input: arr = [2, 1, 5, 6, 2, 3], k = 2
Output: 11
Explanation:
First painter can paint boards 1 to 3 in 8 units of time and the second painter can paint boards 4-6 in 11 units of time. Thus both painters will paint all the boards in max(8,11) = 11 units of time. It can be shown that all the boards can't be painted in less than 11 units of time.
Tell me about yourself
Why Google?
Which product of Google do you like most? Why? Any competing products in the market?
If I asked your current organization for feedback then what will they say? Focusing on negative points.
If you have to improve one technical and one behavioral point then which one will you improve?
In your last organization or before that any leadership work have you done? Mentorship/organizer type.
What will you do when your workās credit will be given to another person?
Any situation when your manager didnāt agree with your idea and how did you convince him?
Why you are leaving before 1 year?
What is your plan for 2 years in technical and non-technical aspects?
Do you have any questions for me?
And googlyness questions

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?