i dry ran it but still couldn’t get
Segmentation fault
edited the condition to s.empty() or heights[s.top()] <= heights[i], not getting segmentation fault anymore but wrong answers
hi @tusharbajaj200153_02bc6c0c5583c81d was checking ur code only
updated https://ide.codingblocks.com/s/665621
1 Like