谷歌 L4 上门 (Chocolate sweetness)

Question 1:

  • Design Linker and compiler.

Question 2:

  • Given a string : aabbcb, it’s encoded as 2xa2xbcb. Write the enocoder.

Question 3:

  • Implement rand25() using rand5() function.

Question 4:

Question 5:

  • Chocolate sweetness. Given an array of n numbers, where the values are sweetness levels of chocolate. You are also given a value K which denotes the number of friends you will share this chocolate with. You friends are greedy so they will always take the highest sweetness sum. Find out what is the maximum sweetness level you could get. (The interviewer was not able to clearly define this problem statement so I spend lots of time in understanding it)
    ex: [6, 3, 2, 8, 7, 5] , k=3 , the values in array is sweetness level in each chunk of chocolate. Since k==3, so you have to divide this array in 3 pieces such that you would get maximum out of the minimum sweetness level.
    so, you should divide this array in 6,3 (6+3=9); 2,8 (2+8=10) and 7,5 (7+5=12). your other two friends will take sweetest chunk, so they will take 2,8 and 7,5. so the maximum sweetness level you could get is 6,3 (9). This you should return.
    Similar question: https://leetcode.com/problems/split-array-largest-sum

这不都是面经 + 高频题吗。。。。。方便解释下为什么Reject?

这个只有hiring committee才知道吧