Google | SWE | Rejected
5 Rounds full day interview
Give an array of boxes with size N+1 with its weight is from 1->N. The final element is empty marked with an 0. Sort the boxes from lightest to heaviest where you can only move 1 box at a time to the empty slot. You should do it in o(N) time.
Get maximum sum from array of coin, if you can only pick k coins from either side of the the array.
Given a binary tree in array form, where each element is <value, parent index>, where remove the subtree given the parent index.
Remove an array of substring from document given its starting position.
behaviorial
I was rejected because my code wasn't optimized. I suspect it's just a random reason given to candidates.