Publicis Sapient interview question

Basic leet code questions like arrays