Question: There will be a three class, x.java, y.java and main.java in x.java there will be a node class attributes. in y.java there will be a
There will be a three class,
x.java,
y.java and main.java
in x.java there will be a node class attributes.
in y.java there will be a splaytree attributes:
add(int v),leftchildofP(x a,x b),(do left rotation)
righchildofP(x a,x b)(do righ rotation)
splay(x a) (do spray using leftchildofP and righchildofP)
remove(x a)--remove x
findx(int v)--find x has variable v
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
