Education + Jobs Hiring Website - 2025
0 like 0 dislike
3,234 views
in Online Assessments by Expert (32,020 points) | 3,234 views

1 Answer

0 like 0 dislike

I solved this using O(n^2) approach by storing elements which are bigger than the present element for both right and left. Any other creative solutions are appreciated.
image

by Expert (32,020 points)