Moloco·Machine Learning Engineer·Online Assessment (OA)
- Given an m x n grid of integers, repeatedly eliminate any cells that are part of a horizontal or vertical run of 3 or more equal values (all in the same round, simultaneously), set them to zero, then apply gravity so non-zero values sink to the bottom of each column. Keep going until no more eliminations are possible. Return the final grid.
- Given two large lists of strings A and B, find the maximum possible length of a longest common prefix between any pair (a, b) where a is from A and b is from B. The input is too large for a brute-force pairwise comparison.
“The simultaneous marking tripped me up at first.”