linkedlist with nodes of same level in a tree