use JavaScript to build a segment tree, and recursion is used in the construction process. This should make the call stack overflow. I wonder if there is any other way to solve this problem.
< H1 > Code < / H1 >
use JavaScript to build a segment tree, and recursion is used in the construction process. This should make the call stack overflow. I wonder if there is any other way to solve this problem.
< H1 > Code < / H1 >
judge that there is something wrong with the condition, and do not stop recursion in time
there is a problem in the calculation of the middle value of the left and right boundary, which should be:
let mid = (l + (r - l) / 2) | 0;
Next: Nuxt picture problem