For example, in php

```
$arr = [9, 4, 3, 5, 2, 6];

```

then,

```
$output = [[0,0], [1,2], [2,2], [1,1], [4,1], [1,0]];

```

[0, 0] = the bigger elements of 9 is 0 on both side

[1, 2] = the bigger elements of 4 is 1 (9) on left and 2 (5, 6) on right side ... [ 9 > 4] - [ 5 > 4, 6 > 4 ]

[2, 2] = the bigger elements of 3 is 2 (9, 4) on the left and 2 (5, 6) on right side

[1, 1] = the bigger elements of 5 is 1 (9) on the left and 1 (6) on the right side

[4, 1] = the bigger elements of 2 (9, 4, 3, 5) is 4 on the left and 1 (6) on the right side

[1, 0] = the bigger elements of 6 is 1 (9) on the left and 0 (no elements after 6) on the right side

I want it in O(n log(n)), is it possible?