Showing run-error in the contest, but working perfectly on the coding blocks IDE.
https://ide.codingblocks.com/#/s/24267
Rain water trapping : run error
Array you used is of size 100, so if n>100, it will produce a segfault runtime error.
1 Like
Thanks, It worked