Basis Worldwide interview question

Array manipulation type question and then a leetcode easy.