Developer-Student-Clubs-VSSUT-Burla / Master-PyAlgo

36 stars 84 forks source link

Finding Longest Consecutive Subsequence in a array #362

Open ShubhamGupta577 opened 3 years ago

ShubhamGupta577 commented 3 years ago

Longest consecutive subsequence in array

Given an array of positive integers. Finding the length of the longest sub-sequence such that elements in the subsequence are consecutive integers, The consecutive numbers can be in any order.

Example:

Input: {2,6,1,9,4,5,3} Output: 6 Explanation: The consecutive numbers here are 1, 2, 3, 4, 5, 6. These 6 numbers form the longest consecutive subsequence.

ShubhamGupta577 commented 3 years ago

@rcoder23, Please assign me this issue under GSSOC21.

rcoder23 commented 3 years ago

You can work on it.