Pregunta de entrevista de RainFocus

SQL, some basic algos and complexity questions