Algorithms optimization and tracing
I want to ask where I could find the advanced exercises or the book with exercises of algorithms optimizing and tracing for my students.
Sample:
Optimize algorithm:
t[0] = 0
for (n = 1; n <= N; n++)
sum = 0
for (i = 1; i <= n; i++)
sum += n-1 + t[i-1] + t[n-i]
t[n] = sum/n
Another sample:
Result of:
for(int i = 0; i < 10; i++)
{
Console.WriteLine((i + 1 + i) / i )
}