2 Topics
|
|
Can somebody give me advice on how to create a recursive version of GetEnumerator()? The well-known Towers of Hanoi problem (see e.g. [url]http://en.wikipedia.org/wiki/Tower_of_Hanoi[/url]) may serve as an example that is comparable to the actual problem I have. A simple algorithm to show all moves for a stacjk of disks of … |
|
Sometimes we need to generate sequence and perform some process on the results. This usually results in some code like this (We'll be using the [URL="http://en.wikipedia.org/wiki/Fibonacci_number"]Fibonacci sequence[/URL] in these examples): [code]void MyMethod() { // What we want to do is output to the screen the first 10 Fibonacci numbers // … |
The End.