Oracle Interview Question

implement a leetcode algorithm about arrays