Quote Originally Posted by laserlight View Post
Alternatively, you could sort the list, and then go through the elements in a single pass to count them. This will result in performance similiar to the use of a balanced binary tree.
Thanks, I nearly got the idea, however am not sure how to identify the most lengthy subsequence in a sorted list in order to outline the element, could you please explain in detail?