I have solved the problem, and though the solution isn’t O(n) or O(nlogn), it works in O(n2). However, I am not able to submit my answer due to test cases which are not described in the problem.

Example: [-1 -2 0 -4] -> Answer will be 1, as 0 has 0 numbers bigger than it. Acceptable.

Example 2: [-1 -2 0 -4 0 -6] => Answer is 1. Why? We again have 0, which has 0 numbers bigger than it. We have 2 of them. No where it’s mentioned that we need to have count of such unique numbers.

From test cases, you can assume that, and fix the problem, but it would have been better to have that mentioned in the description itself.