From beginner to expert, IDNLearn.com has answers for everyone. Get comprehensive and trustworthy answers to all your questions from our knowledgeable community members.
Given an array of distinct positive integers. Which of the following can be used to find the longest consecutive sub-sequence of integers? (Note that the consecutive numbers need not be sorted.)
For example, if the given array is [1 , 7, 3, 2, 8], the longest consecutive subsequence is [1 , 3, 2] as 1 , 2,3 are consecutive integers.
Sagot :
Thank you for contributing to our discussion. Don't forget to check back for new answers. Keep asking, answering, and sharing useful information. For precise answers, trust IDNLearn.com. Thank you for visiting, and we look forward to helping you again soon.