My code is showing segmentation fault in coding blocks ide and hence not getting accepted.But it works fine on codeblocks ide and ideone
MY CODE-
Showing segmentation fault works fine though
Nope still shows the same error
@abhinavgoyal912
yeah i have checked it , it is working in other ide .
try this build tree function->

or
use string in place of char array.
ur updated code->
Note -> the issue is related to compiler , logically ur code is totally fine
1 Like