when to splay the rules that dictate when splaying is performed are as followswhen searching for key kif is found at node xwe splay xelse we splay the parent of the external node at which the search terminates unsuccessfully for examplethe splaying in figures and would be performed after searching successfully for key or unsuccessfully for key when inserting key kwe splay the newly created internal node where gets inserted for examplethe splaying in figures and would be performed if were the newly inserted key we show sequence of insertions in splay tree in figure figure sequence of insertions in splay tree(ainitial tree(bafter inserting (cafter splaying(dafter inserting (eafter splaying(fafter inserting (gafter splaying