PayPal interview question

tech: flatten multi-dimensional array, oop programming, sorting