Microsoft Interview Question

OA at Codility easy-mid leetcode question