Hey, so I'm having a lot of trouble writing a class for binary search tree's. It must perserve AVL at all times and do single and double rotations where necessary.
I dont even know where to begin. I made a tree node class that points to left, right, and keeps a value. Now what!? I'm so lost.
You can begin by creating an struct
struct bintree{int key; bintree* left;bintree* right;}
this holds a value called key and two pointer left and right.