<< Sun, Java, Bugs, ... | Home | Weblog Software Upgraded >>

Sums Of Odd Integers

Here's a hint for a question I posted eight days ago:

"Can you write a function that calculates the sum of all odd integers from 1 to 2n+1?"

The answer is n2. If you don't know this, your function will be O(n) instead of O(1).




Add a comment Send a TrackBack