Sunday, October 13, 2013
Recursion
By definition, recursion is "a method where the solution to a problem depends on solutions to smaller instances of the same problem." My definition would be: "calling the same method from the inside of the method". Recursion is not only about methods but when I hear about recursion, recursive methods are the first things that comes to my mind. Recursion can be very useful in computer science. Like we did in the Assignment 1, you can use recursion to create an algorithm about moving n cheeses from first stool to the nth stool. Recursion is an interesting concept and sometimes a little bit hard to comprehend.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment