JPMorganChase interview question

Array manipulation, basic python functions. Questions test logic not application of Python