Pergunta de entrevista da empresa ByteDance

4 coding question within 2 hours. 3 using python and 1 using sql.