It has been too much time.
Also I just learned treaps, so I guessed I might as well make this thing.
It's not meant to help someone learn treaps: I simply put random operations each frame depending on what key you are pressing (It's quite trippy), but if you want to get user input decently so that you can actually see what the ds(data structure) is doing it shouldn't be too hard.
The code in Treap.h is not organized too well, but it should be understandable.
Also I just discovered that if you want to make a template class you have to put both declarations and implementation in the same file? wtf
If you want me to add some features or something just ask here.
If you download this you should probabilly be entratainded for about 1 to 12 seconds.
inputs are:
- I for insert
- E for erase
- R for rotate
Also feel free to ask anything about how treaps work.
And if you notice a mistake of mine please tell me so that I won't do it again.
have fun?
P.S.
I also wanted to post this in the forum so that people reading this might get into the world of algorithms and competitive programming, which is super fun and cool.