Convert sorted array to binary search tree | LeetCode 108 | Easy

preview_player
Показать описание


00:00 Problem Description
01:41 WhiteBoarding
05:32 Final code
Рекомендации по теме
Комментарии
Автор

You are awesome! thanks for your explanation.

chiaueichi
Автор

Nice explanation man just subscribed your channel keep it up and put some more videos

RiteshYadav-rcnp
Автор

What I don't understand is why we need to create a new root in every recursion (line 33). How did you connect each new root to form the final tree?

lincolnwang
Автор

u have mixed java and javascript I guess...int middle and var root?

mahimaarora
Автор

what if you have array with even indexes ? How will you find the middle ?

anm_