Abacus.AI Interview Question

Coding question was a leetcode easy question