LINE MAN Wongnai interview question

Why would you choose this algorithm/method?