Binary Tree in Objective-C
I am learning algorithms and data structures and to train I am trying to design and implement a binary tree using objective-c. So far I have the following Classes: main - for testing Node - node of tree BinaryTree - for all methods related to the tree One of the first methods in BinaryTree class I implemented is insertNode:forRoot: . - (void)insertNodeByRef:(Node **)node forRoot:(Node **)root{ if (head == NULL) { head = *node; } // Case 2 root is null so can assign the value of the node to it if (root == NULL) { root = node; } else { if (node.data > root.data) { // to the right [self