SenseTime interview question

an LC hard-level coding problem