You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Problem Statement: Longest Consecutive Subsequence
# longest consecutive subsequence : Given an array of integers, find 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: arr[] = [1, 9, 3, 10, 4, 20, 2]
# Output: 4
# Explanation: The subsequence 1, 3, 4, 2 is the longest subsequence of consecutive elements