Meta interview question

a sorting problem and a random sampling problem