Floor in BST ?| Simple Recursion | 4 lines code | ?? C++, Java & Python | POTD | Geeksforgeeks смотреть онлайн
In this video, I solved the "Floor in BST" problem, which is a medium level question asked on Geeksforgeeks. The problem requires finding the greatest value node of a Binary Search Tree (BST) that is smaller than or equal to a given value.
I explained the simple recursive solution along with the property of Binary Search Tree to solve the problem. The idea is to do the recursion on the left side of the root if the data of the root is greater than target or do the recursion on the right side of the root if the data of the root is less than or equal to target.
00:00 Introductory Note
00:08 Introduction to the problem
01:00 Understanding Binary Search Tree
03:12 Understanding the question
05:51 Framing the approach to solve the problem
10:28 Going through the code
The code is very time-efficient (O(n)), where n is the number of nodes in the tree and space-efficient (O(1)).
I have also made a GitHub repository of codes to this problem in C++, Java, and Python languages.
GitHub Repo Link: https://github.com/AlgoZenithNITC/GFG_POTD_Solutions_AlgoZenithNITC/tree/main
Please watch this video and share it with your friends who are interested in programming. Don't forget to subscribe to my channel for more exciting videos like this one! ???
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Floor in BST ?| Simple Recursion | 4 lines code | ?? C++, Java & Python | POTD | Geeksforgeeks» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.