Loading…
Google Interview experience
1 round over 7 weeks. No offer, good experience.
I was asked to solve a variation of text justification/word wrap problem from leetcode.
Problem:
You're given a list of strings (words) and a specified line width k. write a function that outputs the number of lines needed to format the words such that each line is exactly k characters wide, with words spaced as evenly as possible.
Example:
words = ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]
k = 16
Output: 3Know someone interviewing at Google? Pass it on.
Same company, different candidates.
Share yours while it’s fresh. It takes five minutes, it’s anonymous, and it will help future candidates.