This week we learned Trees, it seems everyone suffering from the midterm week include in me, which I didn't catch much about it. Tree traversal has three basic type: Preorder, Inorder, Postorder, which gaves more ways than List. Preorder is pretty straghtforward, but Inorder and Postorder seems easy to messed up for me.
During reading week, I spent a lot of time in assignment 1, before I start I thought it wasn't hard at all since I understand everything from the friday's assignment lecture, but it still took me longer time than I expect especialy in the last 2 part, after tons of tries, I found that paper work is really helpful to sovle the optimal steps for 4 pegs hanoi and the recursion function. and I found that the best number of discs to be moved in first step is half of the total discs. I hope I'm right.
没有评论:
发表评论