Naive implementation of a binary tree for iOS developers