I cannot able to get required output
Find the greater elemenet
@sulbh579
I’ve corrected your current approach
But your approach is N^2 while solution should be N
So please think about that
This code is not giving correct output
4,2,5 it is giving -1,5,-1
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.