Implemented a serizlize binary tree algorithm