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