Added the implementation of level order