JNEXT Problem SPOJ https://www.spoj.com/problems/JNEXT/


Getting RUNTIME ERROR
This Problem is based on stack

hey @dsingh200021, have u considered the case:
6
1 5 4 8 5 3
here answer should be 155348
ur code will give 158534