Hello so I am working on my treap method which requires a Stack to track the list of nodes that it goes through, and maintains the Heap Property by doing a list of rotations at the end. However, when I run this code it gives me nullPointerException() for my rotate methods. Not sure what I am doing wrong. Here is the link to both my node and Treap class. My Node and Treap Class Code
Asked
Active
Viewed 96 times
0
-
Looks like problem in line 101. You should use `rotateLeft` there – Alex Apr 25 '21 at 05:32
-
Please crate a [mre] and paste it into the question itself so that you will not need to keep the code from this question on GitHub indefinitely and so that it’s easier for a reader to get an overview. – Ole V.V. Apr 25 '21 at 06:42