I have an ordered binary tree class in the data property that I store id data so that the tree can store any data.
When creating a new node, I compare the values โโ([tmp.data compare: Node.data]) and, depending on this, I follow the left branch or the right one.
Here is an example: I add the root @ "6", and then add the node with the data @ "12" and it goes along the left branch. I understand that 1 <6, but the second line seems to be longer and should go to the right.
Tell me what am I doing wrong?