Xiaomi interview question

Asked questions on DSA and algorithms