BNP Paribas Interview Question

Brainteasers involving algorithmic and complexity analysis