Retool interview question

Leet code medium on arrays