Meta Interview Question

lc 560 with two follow-up