Coding round. Comments stream in. You must batch them without sorting. First, say why two comments on the same path can land in different batches. Then implement the collapse. Then the interviewer inserts a comment with a blank path and asks whether it joins the previous batch. It does not. Then they ask how you would hold the batches if the stream is too long for one list. Give the rule, the function, and the blank-path case.
Preparing this page…
Your current navigation and account state stay available while the next page loads.