Google NYC onsite 面经


两周前onsite,5轮,上周HR打电话HC过了,match了team,现在在等最后VP 和 SVP的review, 求Bless !
Product of word length which words that share no letters(all lower case)E.g {feed , see, stuck }: max product: 5×4=20Complexity?Follow up:optimal way to exit earlier in loop.

2. RLE run-length compression

Encode: helll=> he3xl, decodeRequirements:1. Decode(encode(s))==s; 2. Shortest lengthFollow up: unit test: test requirement 12
3. Word abbreviation,e.g. Between=>b5n,friend=>f4d Follow-up: implement Bool checkduplicate(string [] dict, string word) E.g. {feed }, feed => false;{door }, deer =>true;{dare}, deer => false如果dict里有word 和input word的abbreviation 一样,则return true
4. Poland operation list convert to tree E.g. {push 4, push 5, add, push 9, mul, sqrt} => tree: {sqrt,{mul,{9, add(4,5)}}}

5. Design Question: Get program running on data centers, try catch and scalability , cache followups