LIS [ i ] stores the length of the longest increasing subsequence ending with arr [ i ]
List < int > [ ] LIS = new List < int > [ n ] ; for ( int i = 0 ; i < n ; i ++ ) LIS [ i ] = new List < int > ( ) ;