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*

4
  • I know the question doesn't make it explicit, but note that this solution produces data of a type different from the source. Commented Feb 3, 2011 at 10:53
  • @Martinho, you are rightt. still we can fix it by OrderByDescending without aggregate...... Commented Feb 3, 2011 at 11:22
  • 1
    that works, but note that it raises execution time from O(N) to O(N log N). Commented Feb 3, 2011 at 11:24
  • @Martinho, yep we need to consider that too :) Commented Feb 3, 2011 at 11:26