Skip to content

Commit

Permalink
Fix java treap test (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
indy256 authored Sep 1, 2024
1 parent ff3e348 commit 80b4e9d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions java/structures/Treap.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,15 @@ public static void main(String[] args) {
treap = insert(treap, 3, 2);
treap = insert(treap, 6, 1);
System.out.println(kth(treap, 1).key);
System.out.println(query(treap, 1, 10).mx);

TreapAndResult treapAndResult1 = query(treap, 1, 10);
treap = treapAndResult1.treap;
System.out.println(treapAndResult1.mx);

treap = remove(treap, 5);
System.out.println(query(treap, 1, 10).mx);

TreapAndResult treapAndResult2 = query(treap, 1, 10);
treap = treapAndResult2.treap;
System.out.println(treapAndResult2.mx);
}
}

0 comments on commit 80b4e9d

Please sign in to comment.