X Interview Question

They are all algorithm question