HP Inc. Interview Question

2 leet code easy about arrays and numbers