Question d’entretien chez TikTok

Divide and conquer algorithm question in Python.