zig-zag step the zig-zag operation is performed when is not the root in addition to thisn is the right child of and is the left child of or vice versa in zig-zag stepthe tree is first rotated on the edge between and pand then rotated on the edge between and refer fig figure zig-zag step inserting node in splay tree although the process of inserting new node into splay tree begins in the same way as we insert node in binary search treebut after the insertionn is made the new root of the splay tree the steps performed to insert new node in splay tree can be given as followsstep search in the splay tree if the search is successfulsplay at the node step if the search is unsuccessfuladd the new node in such way that it replaces the null pointer reached during the search by pointer to new node splay the tree at example consider the splay tree given on the left observe the change in its structure when is added to it solution zig-zag step ( ( ( ( note node to get the final splay treefirst apply zig-zag step on then apply zig-zag step to make the root