Google | L3 | Onsite Questions
Anonymous User
899

L3 Interview Loop
YoE : 2

Round 1

You are given a chat log.txt file in the following format

John > Hello World!
Doe > Here comes one another noob coder.
John > Watchout! Just because I am unable to spot a bug in the next question, you call me a noob?
Doe > Well, if you are unable to solve any question, you don't deserve google.
John > We'll see about that.

Return the top k talkative people in the chat. More talkative means more number of words. Also, you are given a helper function which accepts the log file path and returns you an array of pairs (one pair for each line) like <name, number of words spoken in the line>.

Round 2

You are given an array of elements. Return true if you can remove an element from the array and resultant array can be partitioned into two halves having equal sum. Else return false.

Ex - 1 > 2 > 1 > 3
Returns true because after removing 1 (i = 2), 1 + 2 = 3.

Ex - 3 > 2 > 1 > 1
Returns true because after removing 1 (i = 2), 3 = 2 + 1

Ex - 1 > 20 > 30 > 4
Returns false since no element's removal can distribute the array into two equal halves.

P.S : I will keep updating this post with further round questions.

Comments (9)