Xiaomi interview question

Array based coding questions