Generating all possible trees of depth N?

后端 未结 4 625
一生所求
一生所求 2021-01-03 11:47

I have several different types of tree nodes, each of which may have anywhere from 0 to 5 children. I\'m trying to figure out an algorithm to generate all possible trees of

4条回答
  •  余生分开走
    2021-01-03 12:04

    http://books.google.co.uk/books?id=56LNfE2QGtYC&pg=PA23&lpg=PA23&dq=hansel%27s+algorithm&source=bl&ots=vMbfFj-iZi&sig=E0cI5XhVZ3q1Lg9eAJ_1zYQm53U&hl=en&ei=8udlStuKJ8ehjAfJ1ZSUAQ&sa=X&oi=book_result&ct=result&resnum=1

提交回复
热议问题