0
public static void main(String[] args) {
    SplayTree<Integer, Integer> st1 = new SplayTree<Integer, Integer>();
    st1.put(5, 8645365);
    st1.put(9, 9);
    st1.put(13, 13);
    st1.put(11, 11);
    st1.put(1, 1);
    
    System.out.println("Chintan "+st1.get(5));
    
}

Here I put the data in a Splay tree... I entered 5 pairs of data inside the Splay tree. Now I want to get data from the splay tree to the dictionary in Descending order. Like the first element has the highest value and descending order.

0 Answers0