LIS [ i ] stores the length of the longest increasing subsequence ending with arr [ i ]
@ SuppressWarnings ( " unchecked " ) Vector < Integer > [ ] LIS = new Vector [ n ] ; for ( int i = 0 ; i < n ; i ++ ) LIS [ i ] = new Vector < > ( ) ;