Загрузка страницы

Construct binary search tree from preorder traversal | Leetcode #1008

This video explains a very important programming interview problem which is to construct a binary search tree or BST from given preorder traversal. I have explained 2 approaches for this problem. The first approach is a very simple algorithm to construct BST in just O(N2) time.This is the simplest of all methods.I have also explained the intuition behind solving this problem by explaining examples and BST property. The second approach is a much more optimized algorithm which solves the problem in just O(N) time.I have explained both the approaches by taking suitable examples and finally i have explained CODE for both the methods. BOTH CODEs are present in the same LINK given below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: https://gist.github.com/SuryaPratapK/3760f35f450ecdd0e729f222fc6df97c

Видео Construct binary search tree from preorder traversal | Leetcode #1008 канала TECH DOSE
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 апреля 2020 г. 19:44:45
00:12:24
Яндекс.Метрика