Count Complete Tree Nodes | Leetcode
Автор: Techdose
Загружено: 2020-06-23
Просмотров: 41364
This video explains a very important programming interview problem which is to count the number of nodes in a given complete binary tree.This problem seems to be very simple if we are allowed to solve in O(N) linear time by using simple recursion, inorder, preorder, postorder traversal techniques.But can we improve the time complexity to logarithmic time? In this video i have shown how we can improve the time complexity by using the property of complete binary tree.The time complexity of the efficient approach is O(logN * logN).I have explained the algorithm using proper examples and code is explained at the end of the video. CODE LINK is present below as usual. 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 :)
=================================================================
INSTAGRAM: / surya.pratap.k
LinkedIn: / surya-pratap-kahar-47bb01168
WEBSITE: https://techdose.co.in/
=================================================================
CODE LINK: https://gist.github.com/SuryaPratapK/...
OTHER PROBLEMs:-
Search in a Binary Search Tree: • Search in a Binary Search Tree | Leetcode ...
Invert Binary Tree: • Invert Binary Tree | Leetcode #226
Cousins in a binary tree: • Cousins in a binary tree | Leetcode #993
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: