YoE : 8
Time taken in prep: 3 months
Leetcode problems: 127
I have just botched a google onsite interview and I wanted to share why that happened and what I could've done better.
Tips
Questions
I can't remember all the questions as I didn't take notes, but here is what I can recall:
Questions 1
You are given an infinite number of dice and you want to represent numbers with them. A represented number is lining up dice faces to make up the number, so 11 is 2 dies of faces 1 and 1, 15 is one '1' facing die and one '5' facing die . A number can only be represented fully or be a sum of fully represented numbers.for example:
* 66 can be represented fully
* 82 cannot as we don't have a die face for '8' so we have to find a number that sums to 82 and is made up of representable number, so 82 can be 66 + 16 and that would be the correct representation
Given any number, you need to find the optimal way to represent it with the smalles number of representable numbers
Question 2
You need to find the path with the largest sum in a matrix, but you cannot go back or diagonally, also there are barriers of 0s along the way, the matrix also has no cycles, so you cannot go back to a number from another number
Example:
[1,2,3,4,5]
[0,2,0,0,9]
[1,6,7,0,0]
[0,8,0,0,10]A DP problem
Question 3
I cannot remember the exact question but was similar to guess the word with different variables and we are looking for a set of numbers in a big range
Aced the SDI and the googlyness of course.