arr [ i ] wants to be a potential candidate of future subsequence It will replace ceil value in tailIndices
else { int pos = GetCeilIndex ( arr , tailIndices , -1 , len - 1 , arr [ i ] ) ; prevIndices [ i ] = tailIndices [ pos - 1 ] ; tailIndices [ pos ] = i ; } }