Problem in code

createTree function showing error

there are some problems that u need to fix before the logic itself
for an input if 500 numbers, 1-500 it will go only upto 277 and not store anymore numbers since, 1 2 3 4 so on it will exhaust 1000 due to the the fact spaces are also counted
next up, end ur class with ā€˜;’ at the end
next, u have not declared ā€˜v’ maybe u wanted to use nums here
first work should be fixing these errors