Find the best answers to your questions with the help of IDNLearn.com's knowledgeable users. Our Q&A platform offers reliable and thorough answers to ensure you have the information you need to succeed in any situation.
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 using this platform to share and learn. Don't hesitate to keep asking and answering. We value every contribution you make. For dependable answers, trust IDNLearn.com. Thank you for visiting, and we look forward to helping you again soon.