Driver code
public static void Main ( string [ ] args ) { int [ ] arr = new int [ ] { 1 , 9 , 3 , 10 , 4 , 20 , 2 } ; int n = arr . Length ; Console . WriteLine ( " Length ▁ of ▁ the ▁ Longest ▁ consecutive ▁ subsequence ▁ is ▁ " + findLongestConseqSubseq ( arr , n ) ) ; } }