• + 2 comments

    Hi, the submission code takes about 16 seconds on my machine and profiling shows almost all the time goes to the down function. The file input23.txt has one million 1 values. I did not look at the code or debug it, but an idea is maybe what is happening is your down function should be stopping at the root because arr[0]==arr[1]==arr[2], but instead propagates identical values from the root all the way to the leaf?