For revisiting my earlier Slog posting, I decided to choose week 5 Slog which is about recursion. The reason why I chose recursion Slog is that while I go through CSC148 assignments, most of them was using recursion so I learned more knowledge about recursion.
After I read my previous post, I agree with most of it and now I learned more about the parts where I was little confused. I'm agreeing with what I described the recursion: function in a function. I learned more about that part which is to make a recursion, a code must have the same function with different variable. The variable is not actually changing but things to put for the variable is different like if a code is like Tree, then it works like some_function(child) for child in children so it can make child as a value and it keeps going until there is no child. In case of no child, we have to make a if statement with condition of no children and return some value we want.
댓글 없음:
댓글 쓰기