Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 2
    What does nextElement() do and is the allElements() collection constant? Commented Feb 10, 2012 at 9:48
  • how you are calculating average(allElements) Commented Feb 10, 2012 at 9:49
  • It depends on your values in that collection. average(allElements) will return fractional values or absolute? Commented Feb 10, 2012 at 9:49
  • @RoyDictus: It's supposed to be pseudocode. Just imagine that nextElement() moves the pointer curElement to the next element of the collection, or to the beginning if we're at the end. Commented Feb 10, 2012 at 9:51
  • @RoyDictus: Oh, and allElements will be changed when curElement is set. Commented Feb 10, 2012 at 9:51