Abacus.AI interview question

Coding question was a leetcode easy question