Meta Interview Question

2 medium leetcodew were asked