Find the Floor & Ceil Value in a BST | Ceil in BST | Floor in BST | Binary search tree | DSAOne #70

preview_player
Показать описание
Hey guys, In this video, We're going to solve two questions.
1. Find the Floor value in a Binary Search Tree (BST)
2. Find the Ceil value in a Binary Search Tree (BST)

💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!

🥳 Join our Telegram Community:

🚀 Follow me on:

Hashtags:
#anujbhaiya #dsaone

Tags:

ceil in bst
floor in bst
bst
dsp anuj bhaiya
java anuj bhaiya
anuj bhaiya dsa
binary search tree
binary search tree java
binary search tree python
binary tree
binary tree in data structure
binary tree to bst
bottom view of binary tree
ceil in bst gfg
left view of binary tree
search in bst
Рекомендации по теме
Комментарии
Автор

I loved the way you explained the code and dry runned the code ... It is easy for us to understand the code . Such a wonderfull DSA course on YouTube.

ashishbiswakarma
Автор

Thanks bhayia a learnt allot of from you

MysteriousLoveSingh
Автор

At 1:48 why floor of 4 is (+Infinity)?

ShantanuForMusic
Автор

I appreciate your effort put in to teach us difficult topic in easy way

saritaprasad
Автор

Thank you so much bhaiya for this video 😘

Rohan-wwcw
Автор

Hello Anuj… thanks for the wonderful series… Will you please start similar series on Graphs

Geetli
Автор

static int floor(Node root, int k){
Node curr=root;
int ans=Integer.MAX_VALUE;
while(curr!=null){

if(curr.data >= k) ans=Math.min(ans, curr.data);
// if(temp.data == k) return temp.data;
if(curr.data > k){
if(curr.left!=null)
curr=curr.left;
else
return ans;
}
else{
if(curr.right!=null)
curr=curr.right;
else
return ans;
}
}
return ans;
}

anshulsingh
Автор

Thanks bhai for such an amazing content...Also when will you start Dynamic Programming Questions?

anshulsingh
Автор

Bhaiya can u please tell me how many topics are still left?

gauravkumarsingh
Автор

Bhaiya ye coding to theek h but ye jo interviews me dbms os etc. etc. Puchte h can you make one video of giving insights on how deep we need to study that when and from where we have to study? What subjects are asked??

mugdhashrivastava
Автор

Anuj bhaiya kya DP important he DS ke liye

ayushsoni
Автор

Nice video, 🙌👍, just a request i am mentioning again, can u please a make video on dfs or minimum jumps to reach at the end of array, because that code requires how use a loop inside a recursion code(some what like backtracking)

singhji
Автор

same as Inorder successor and predecssor

pinkkitty
Автор

Hello sir please send me your opinion about acciojob?? Should I join it or not??

swapnalisonavane
Автор

bhaiya please make video on next permutation problem (leetcode31)

anujkhare
Автор

Anuj Bhaiya I need your help personally.

ankitaggarwal
Автор

Bhaiya i want to start you to teach us c++ language from zero please it's a humble request

asitkumar
Автор

Bhaiya plss videos thora jaldi dalia, placements start hone wala hi hai hamara....

ashishbiswakarma
Автор

bhaiya please new playlist add kariyea, placement question solved in laptop, explain on board which question in your sheet .


please, please please, please please, please please, please please, please please, please please, please

abdulmajidshaikh
Автор

Anuj bhaiya apka jo Java ka video the Apni Kakshya channel pe wo kyu remove ho gye suddenly ? please wo cource dubara apki khud ki channel me upload kijiye atleast ya fir fir se java ka video banayine jisme basic se advance ka topic cover ho just like Apni Kashya. Please reply jarur kijiye. It was great content. why removed ? 😭

sandeepkumar-ofwy