geek4u,
             I agree with you that the original problem description is
not very clear, but I guess by
"sequence of consecutive integers" he means a substring of the sequence
(not just a sequence). If the problem is to find a subsequence (without
any restriction on the length of
the subsequence) then your solution is excellent with O(n) time and
O(1) space complexity.

thx
Aj


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to