Largest Bst in A bt

codeLink : https://ide.codingblocks.com/s/184175

getting command terminated message please correct it specify my error

hey, there are error in buildPreOrderBinary function

the ith index is not being incremented
updated code: