How to solve this ? Google Interview Onsite Failed .
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-11-12Added By Anonymous
Source: Link
Company: Google
Role: unknown
Interview Stage: Onsite
Location: unknown
Year: unknown
Original Post Content:
I had my Onsite from Google, didn't do well. Practiced around 100 problems but found no success. The question was as follows:
Initially the question was very vague, it said compute the max probability of a generated word of length m given m and a Probability table. The interviewer only mentioned that P['a'|'b'] = 0.05 means the probability of character 'a' before 'b' is 0.05. I was able to come up with a brute force solution but even that wasn't complete. Had to come up with the mathematical formulae to compute the probability which is a Markov chain I guess; this also looks like a graph problem. Any ideas of how to solve it optimally?