Тёмный

5.19 Splay Tree Introduction | Data structure & Algorithm 

Jenny's Lectures CS IT
Подписаться 1,7 млн
Просмотров 280 тыс.
50% 1

Correction: at14:21 9 will be left child of 10
DSA Complete Course: https: • Data Structures and Al...
In this lecture I have discussed basics of Splay tree, rotations used in splay tree, advantages and drawbacks of splay tree, applications of splay tree.
See Complete Playlists:
C Programming Course: • Programming in C
C++ Programming: • C++ Complete Course
Python Full Course: • Python - Basic to Advance
Printing Pattern in C: • Printing Pattern Progr...
DAA Course: • Design and Analysis of...
Placement Series: • Placements Series
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
Connect & Contact Me:
My Hindi Channel: / @jennyslectureshindi
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/profile/Jayanti...
Instagram: / jayantikhatrilamba

Опубликовано:

 

12 ноя 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 243   
@JennyslecturesCSIT
@JennyslecturesCSIT Год назад
Correction: at14:21 9 will be left child of 10
@darshinisiripuram5167
@darshinisiripuram5167 Год назад
Do explain skip list madam
@tushargupta2009
@tushargupta2009 4 года назад
Splay tree is the topic which you will hardly find on youtube. Thank you mam for explaining this topic so perfectly on demand.
@pradnyakharade3718
@pradnyakharade3718 3 года назад
Correction - 14:20 that 9 shd be to the left of 10 and not to left of 7
@manishsahu6873
@manishsahu6873 2 года назад
yes right
@locnguyenthe6131
@locnguyenthe6131 2 года назад
yes, i think it must be like you said
@prabhassla4237
@prabhassla4237 2 года назад
trueee
@polycoder
@polycoder 2 года назад
yes you are right. I agree
@nihalsyd7442
@nihalsyd7442 2 года назад
yesbro
@jatinkm
@jatinkm 2 года назад
Really appreciate these lectures here, helping me in the last moment rush to study things when the notes don't explain anything conviniently
@ankitsajwan4239
@ankitsajwan4239 4 года назад
awesome explanation ... thanx a lot, your all videos are helping me prepare for my upcoming exams... god bless you
@huseyinkadioglu
@huseyinkadioglu 4 года назад
someone already mentioned it but im gonna right it anyway for anyone didnt see that comment , 14:20 9 is gonna be the left child of 10... and Jenny thanks.. getting use to the accent btw.
@prajwal4245
@prajwal4245 4 года назад
💯💯
@manishsahu6873
@manishsahu6873 2 года назад
right
@indumahaseth116
@indumahaseth116 3 года назад
Node(14) will take 3 rotation. At first,it will take left rotation (zag) and will be placed where node 13 is then it will take right rotation (zig) to take place of node 15 and then at last it will take left rotation (zag) to take place of node 10 and therefore by this way it will become root node.
@ishankmoraiya5351
@ishankmoraiya5351 Год назад
so it become zag-zig-zag rotation ..it is true?????????
@atharvakunde8616
@atharvakunde8616 Год назад
what if I suppose the left rotation as ' zig ' ?
@tushargupta2009
@tushargupta2009 4 года назад
In case of zig-zig or zag-zag rotation we are first rotating grandparent and then parent but in case of zig-zag or zag-zig you are rotating first parent and then grandparent. A little bit confusing
@JennyslecturesCSIT
@JennyslecturesCSIT 4 года назад
yes that's rule about rotation.. u need to take care of this thing while splaying
@tushargupta2009
@tushargupta2009 4 года назад
@@JennyslecturesCSIT okay mam got it✌️☺️
@prithviraghavan1180
@prithviraghavan1180 4 года назад
I get to confused with your zig and zag pronunciation but concept wise its really good !
@saicharan6514
@saicharan6514 3 года назад
Yeah bro!totally confused😆
@unknownman1
@unknownman1 3 года назад
@@saicharan6514 haryanvi accent :)
@goutamsingh5906
@goutamsingh5906 3 года назад
puchi kisi ne - yashraj mukhaute
@glebignites5278
@glebignites5278 2 года назад
Thank you very much for helping me understand this topic!!
@Prateek03
@Prateek03 3 года назад
28:20 -Zag-zig rotation and then Zag rotation 3 rotations applied
@vibhorsoni8517
@vibhorsoni8517 4 года назад
hello mam , your way of explanation is very cooll,,and one of my friend named avi goyal is also your great fan
@leonard866
@leonard866 4 года назад
Merci tu as sauvé mon examen d'algo !
@unnatishukla894
@unnatishukla894 Год назад
Sooooo helpful, you saved me today, ma'am🥰
@aditidoiphode3482
@aditidoiphode3482 2 года назад
This video will be most useful for me before exam .. thanks a lot
@aydinahmadli7005
@aydinahmadli7005 4 года назад
thanks for very clear explanation!
@teetanrobotics5363
@teetanrobotics5363 4 года назад
Just Amazing as usual
@AlishaAli-jr2ob
@AlishaAli-jr2ob 3 месяца назад
i didn't find code implementation of trees in cpp, i love your videos way of teaching kindly pls make videos of implementation
@Bhabukrijal
@Bhabukrijal 3 года назад
Very nice delevering technique to student . Watching from surkhet nepal.
@editingverse6697
@editingverse6697 3 года назад
I love your teaching mam🥰 i think am fall in love in your teaching❤
@pruthvi491
@pruthvi491 4 года назад
to search 14 we need 3 rotation zag - zig - zag in splaying.
@saikumarmudhiraj9702
@saikumarmudhiraj9702 2 года назад
No need
@prabhassla4237
@prabhassla4237 2 года назад
for last question ‐---》 *s1 : * zig rotation of 15 so 13 is new parent and 14 attaches to 15 on left side *s2 : * zag rotation of 10 so 13 is new root and 11 attaches to 10 on right side *s3 : * zig rotation of 15 so 14 is new parent *s4 : * zag rotation of 13 so 14 is new root right?
@rahulramesh7115
@rahulramesh7115 3 года назад
I am lazy, I just like videos to support who made them. But this video is THE VIDEO on RB trees. I saw it fully with adv and repeatedly. I pray you should feel satisfied and fulfilled in all your life.
@mahimsd7645
@mahimsd7645 4 года назад
Excellent Explanations Jenny... God bless you !!!!!!!
@himanshu7916
@himanshu7916 Год назад
I have never seen such kind of teacher, teaching as perfect as you are!!! We Are really Very Glad😊 To Have youu Mam🤌❤️ Such an extraordinary concepts you have built yourself, really great mam hats off to you 🙌🫶✨
@shyamprakashm6325
@shyamprakashm6325 4 года назад
Mmm expected video from my side ...thanks 😍
@sairajerepalli9991
@sairajerepalli9991 4 года назад
wow! You gave a very clear explanation madam
@inspiringbeing3230
@inspiringbeing3230 4 года назад
Maam DBMS series will be uploaded and completed before 24?!?! Was about to start tuesday nA
@vakhariyajay2224
@vakhariyajay2224 2 года назад
Thank you very much. You are a genius.
@rahulsrivastava7017
@rahulsrivastava7017 4 года назад
mam what about the case in which grandparent of the node (to be searched) is not the root? like searching 14 in the last example , if we perform any rotation in case3 like (zig-zig ,zag-zag, zig-zag, zag-zig) then 14 would not be at the root , it would 1 level below the root? is that correct?
@codecamp2111
@codecamp2111 4 года назад
Thanks for taking my request
@pavanpotnuru6701
@pavanpotnuru6701 4 года назад
Awesome explanation thank you....
@siri3359
@siri3359 3 года назад
amazing explanation, thank you mam :)
@sagarmehta3197
@sagarmehta3197 Год назад
Hi ma'am, I have a doubt, at 14:20, the tree on the left states that 7 becomes the root for 9 and 10, but then why is 9 on the left of 7, shouldn't it be on the right side of 7? Or we can have 9 instead of 7, 7 on the left and 10 on the right?
@Narend1987
@Narend1987 4 года назад
Mam, all your lectures are very good. In this lecture you have stated multiple times zig and zag are sometimes said in opposite way, can you please provide some reference to which books or reference you are referring to?
@eshanjain1315
@eshanjain1315 4 года назад
a big thanks for your work
@riteshkumari5415
@riteshkumari5415 3 года назад
Thanks mam, easy to understand :)
@yamilz32
@yamilz32 3 года назад
Hello, in minute 16:00 the 13 in the ZAG seems wrongly placed in comparison to the 9 in the ZIG or viceversa.
@user-zi2mg6yy1e
@user-zi2mg6yy1e 3 месяца назад
ma'm i really appriciate your study videos. they are very useful for my studies. thanks alot from sri lanka😘😘
@shubhambatra6989
@shubhambatra6989 4 года назад
Thanks for this wonderful lecture , keep it up Jenny 👍👍 you are doing a wonderful job for all the learner’s out their .
@madhukiranattivilli2321
@madhukiranattivilli2321 2 года назад
Hi Jenny, Cud u review this and clarify/confirm/correct? Suppose a and b to the left and right extreme of splay tree are the most frequently accessed. search(a) zigs, makes a root, and pushes b down by almost double height. And search(b) next zags, make b root, and pushes a double the height down (when compared with the original tree height). So, every time these 2 searches happen consecutively, multiple rotations and too much skewing of the tree would occur, and search would be O(logN) and never O(1) How about use Treap instead of Splay Tree to achieve the same? The splay tree keys become Treap keys. Keys satisfy BST rule. Number of searches for a key becomes the node's priority. Priorities satisfy max-heap rule. Hence all those keys that are most frequently searched would always be very close to the Treap root, and skewing would also be relatively lesser. And, above case of search(a) and search(b) happening consecutively, and many times, would ensure that a and b stay very close to Treap's root (if not become the root) due to tremendous increase in their priorities. The extreme zig or zag as with Splay Tree wouldn't happen here. Is there any mistake in my understanding? Please comment on this. Thankyou! :)
@mahir_labib
@mahir_labib Год назад
legendary teaching!
@user-wn4zu4tj5g
@user-wn4zu4tj5g Год назад
From a main tree if i want to search -1 what is the procedure to be followed? which type of rotation it would be!?
@HerbalsforHealth
@HerbalsforHealth 4 года назад
Your lecture on splay trees are very superb...👏👏👏
@meghasinha1706
@meghasinha1706 10 месяцев назад
for searching 14 can we do first zag zig rotation and then zag rotation ?
@AjayThakur-zb3ee
@AjayThakur-zb3ee 4 года назад
Thanks maam today I was looking for that topic in your playlist please complete it ASAP
@gukkie8351
@gukkie8351 Год назад
It's very clear to understand Tsm sister
@alexomelak4200
@alexomelak4200 Год назад
in The zig-zig rotation on the final tree, as we know after splaying the tree must be BST(i.e left child of anode is less than the root node and right child is greater than the root), but when we look the result of the tree after splaying(1) it is not BST( i.e when we look node 7 its left child is greater than (9>7)) why?????
@kishorijathar1204
@kishorijathar1204 3 года назад
Upload on AA tree,KD tree also if possible😄bcoz I know no one will explain it like u :)
@jastar1433
@jastar1433 4 года назад
Mam aapke padane ka style wahhh I like you mam
@fahmidalrifat1238
@fahmidalrifat1238 4 года назад
awsome lecture...keep going
@01-a-mohitjain80
@01-a-mohitjain80 2 года назад
mam 2 rotations will be needed for 14 that is zag-zig then just zag
@OnlyCompleteSolution
@OnlyCompleteSolution 4 года назад
Answer is Zig-zag-zig rotation Thank you memdm ji
@ceylontwowheels4016
@ceylontwowheels4016 4 года назад
thank You So much . Understood Prefectly .♥
@FrontendMonk
@FrontendMonk 3 года назад
mam don't you think that you should also provide the code for better understanding?
@sibaathahmed1984
@sibaathahmed1984 10 месяцев назад
mam...i saw the same tree you told told that parent of the searched node has to roatated untill the root is obtained....in java point website they tod to rotate the grand parent of the node untill the searched nodde is root...which is right mam??can u repost a new version of this vedio reclarifying it??
@Toccobass13
@Toccobass13 3 года назад
Ur energy is fierce
@JavaAidTutorials
@JavaAidTutorials 4 года назад
Awesome ..!!
@nagendrababurachakonda2334
@nagendrababurachakonda2334 4 года назад
Madam sply tree Ana split tree Ana same ha
@yashwanthedwin7021
@yashwanthedwin7021 2 года назад
in zig zig how can 9 be the left child of 7 splay trees also follows the bst right?
@kritiraghuvanshi3309
@kritiraghuvanshi3309 4 года назад
Ma'am pplzz add videos for B-tree. It's really an important topic for our university exam. And I my only source of learning is u.
@JennyslecturesCSIT
@JennyslecturesCSIT 4 года назад
Already uploaded dear. Check out the playlist "b tree and b+ tree"
@potlurisairaj6669
@potlurisairaj6669 4 года назад
Mam can you tell about skip list and xor lists
@ManishKumar-eg7ke
@ManishKumar-eg7ke 4 года назад
Mam insertion of splay trees?
@mustafaghanim6552
@mustafaghanim6552 4 года назад
Very systematic and clear explanation, many thanks!
@neelasatyasai6852
@neelasatyasai6852 2 года назад
lastly mam wrote one more feature , but unable to see, could anyone tell.
@gulabsingh5685
@gulabsingh5685 4 года назад
Mam plz Also discuss answer of your question at the end of the video Becz we unable to get we are right or wrong?😃
@_sourav_
@_sourav_ 2 года назад
What is the point of splaying when we have already found the node?
@gurupreetsingh8347
@gurupreetsingh8347 4 года назад
if a node have more than two parent than how many rotation need to do , mam ji ? do we need to make a node as a root node always if I am searching that particular node ?????
@JennyslecturesCSIT
@JennyslecturesCSIT 4 года назад
yes make it as root node always.
@ashutoshmishra6872
@ashutoshmishra6872 3 года назад
Thank you Lady!!!
@prabhassla4237
@prabhassla4237 2 года назад
for last question ‐---》 *s1 : * zig rotation of 15 so 13 is new parent and 14 attaches to 15 on left side *s2 : * zag rotation of 10 so 13 is new root and 11 attaches to 10 on right side *s3 : * zig rotation of 15 so 14 is new parent *s4 : * zag rotation of 13 so 14 is new root right?
@AbhishekKumar-im2xd
@AbhishekKumar-im2xd 4 года назад
Binary threaded tree.. Mam??
@Kaushal_Sharma22
@Kaushal_Sharma22 4 года назад
Thank you
@inigo1880
@inigo1880 3 года назад
Very well explained
@Sauravgpt34
@Sauravgpt34 4 года назад
One ZIG-ZAG rotation i.e. for nodes 15-13-14 (LR) and then one ZIG rotation i.e. for node 10 -14 (L) :*
@lakshmitulasi4642
@lakshmitulasi4642 9 месяцев назад
First zag then zig zag mam to search the value of 14 . Mam do correct me if am wrong . This is the answer for question asked @ 28:18 Really mam its helping a lot till now ....its like literally 4years since this playlists has been uploaded , we dont have any fikar about ds ka subject. Thats the power of a quality teacher ! Take a bow!! Thank you mam !
@nonstopcodingcodewithadity8238
@nonstopcodingcodewithadity8238 6 месяцев назад
yup correct ;) ;) ;) ;)
@ShrikantGavhale
@ShrikantGavhale 2 месяца назад
15:01 result of zig zig rotation is not following BST property, 9 is greater than 7 so it should be in a right of 7.
@tanmayagarwal8513
@tanmayagarwal8513 4 года назад
Very nice explanation! But I have doubt. After every operation it splays which usually leads to loss of its balancing property, but still we says that its a self-balancing tree. WHY??
@sarvadashriya
@sarvadashriya 3 года назад
I guess it's not about balance factor of AVL but a balance of BST. Balance of BST remains.
@ayushshukla9037
@ayushshukla9037 2 года назад
the most frequent one or the recent ones?? i guess it should be recent ones
@AyushPandey0
@AyushPandey0 4 года назад
Mam greedy algo pr bhi video bnayiye.
@ahmedseliman5540
@ahmedseliman5540 2 года назад
why you don't write the code of AVL and RedBlack ?
@sandeepxytcreations5673
@sandeepxytcreations5673 6 месяцев назад
There after zig zig rotation 9 is placed left to the 7 but it was greater than 7 ,9 shoud be placed right to the 7
@anitha12346
@anitha12346 4 года назад
Mam plz post short cut for all subjects useful for competitive exams
@RailExpressbyPreetam
@RailExpressbyPreetam Год назад
Well explained Mam ☺️
@itsme-pe7el
@itsme-pe7el 4 года назад
what is the difference between strictly balanced and roughly balanced ? can any one plz help
@akhilreddy3434
@akhilreddy3434 Год назад
In strictly balanced like AVL Trees they follow balance factor range i.e {-1,0,1}...if the trees are in this range then it is strictly balanced and if not they are roughly balanced like RED-BLACK Trees
@codecamp2111
@codecamp2111 4 года назад
mam, please make a video on aa tree also
@Maria-kq4bv
@Maria-kq4bv Год назад
Thank you sooo much
@UMERFAROOQ-cl2nd
@UMERFAROOQ-cl2nd 7 месяцев назад
At 14:32 the Child of 10 should be 9 and 15 but you write child of 7 as 9 and 10 ,as we can see 7 is smaller than 9 so 9 cannot be in its left side i think so please let me know this ?
@pinakranjandas5770
@pinakranjandas5770 3 года назад
2 ROTATIONS 1>ZAG-ZIG((zag part)14 will come to the 13 place and 13 will go left to the 14 after that (zig part)14 will go to the 15 place and 15 will go right of 14) 2>ZAG (14 will go to the root place and root 10 will shift left of 14)
@prabhassla4237
@prabhassla4237 2 года назад
for last question ‐---》 *s1 : * zig rotation of 15 so 13 is new parent and 14 attaches to 15 on left side *s2 : * zag rotation of 10 so 13 is new root and 11 attaches to 10 on right side *s3 : * zig rotation of 15 so 14 is new parent *s4 : * zag rotation of 13 so 14 is new root right?
@atharvakunde8616
@atharvakunde8616 Год назад
can I consider the left rotation as " zig " and right rotation as " zag " ?
@user-ub4fl9yl6u
@user-ub4fl9yl6u 8 месяцев назад
sure but your teacher may not consider that, so when they puts a 0 in your answer script, consider it to be a 10 @@atharvakunde8616
@hansafrancis71
@hansafrancis71 4 года назад
The node 9 goes to left child of 7. I think it is not possible. Violating the rules of BST
@Swabhimaan0126
@Swabhimaan0126 2 года назад
Please make a video on segment tree
@thanushaan2510
@thanushaan2510 5 месяцев назад
Ma'am I kindly request , Please teach us about trie data structure with code implementation.
@roushansingh8904
@roushansingh8904 4 года назад
at the very first instance ,your beauty n now your hard work is compelling me to fall for you..😊😊
@hemantalanguageforumhlf4921
@hemantalanguageforumhlf4921 2 года назад
Don't fall brother, She is teacher & teacher always rise students knowledge.
@rahulkr7878
@rahulkr7878 3 года назад
(search - node 14 )require 3 rotation to become a root
@ayushkesarwani4233
@ayushkesarwani4233 4 года назад
Mam Will you please check the BST after the zig-zag rotations I think it doesn't follow.....if I'm wrong then ignore me🙂🙂
@259_parthpatidar9
@259_parthpatidar9 3 года назад
ha bhai me bhi whi bolra
@munibamehboob8384
@munibamehboob8384 9 месяцев назад
Ma'am can you please upload video on Kd Tree .....
@saisiddanthyr5793
@saisiddanthyr5793 4 года назад
mam plezz make a video of tries data structure....
@mohamedkanu66
@mohamedkanu66 4 года назад
Searching 14 requires a combination of three operations mam: Zag - Zig - Zag! Guess am correct! If not please let me know. Thanks for being this super excellent and precise. May Allah bless you
@Nraj1907
@Nraj1907 4 года назад
Correct
@kannanbs4087
@kannanbs4087 4 года назад
Thxs mam for uploading this vd😍
@AbhishekKumar-im2xd
@AbhishekKumar-im2xd 4 года назад
Mam, threaded tree... Please??
@shivanshsharma3042
@shivanshsharma3042 4 года назад
Need a video on AA TREE please...
@prabhassla4237
@prabhassla4237 2 года назад
16:48 -> right-side if you want to search 30; we will perform 4 zig rotations i.e. zig zig zig zig rotation....
Далее
5.20 Splay Tree Insertion | Data structure
34:26
Просмотров 175 тыс.
Tries
9:40
Просмотров 131 тыс.
Splay Tree in Data Structure
12:28
Просмотров 46 тыс.
10.1 AVL Tree - Insertion and Rotations
43:08
Просмотров 1,1 млн