Sigma Technology Interview Question

All technical questions are from here: https://open.kattis.com/