X Interview Question

OOP, sorting, data sampling