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