Rustom Mody <rustompm...@gmail.com> writes: > Thats not bfs. That's inorder traversal
Oops, you're right. How's this: bfs x = go [x] where go [] = [] go (L x:ts) = x:go ts go (B x lst rst:ts) = x : go (ts ++ [lst, rst]) *Main> bfs t [6,2,8,1,4,7,9,3,5] -- https://mail.python.org/mailman/listinfo/python-list