Nokia Interview Question

The question was related to the array sorting