add traverseTreeByLayer.cpp.