Meta Interview Question

Easy array problem Easy greedy problem