Basis Worldwide Interview Question

Array manipulation type question and then a leetcode easy.