text: min_avail represents the minimum number which is still available for inserting in the output vector . pos_of_I keeps track of the most recent index where ' I ' was encountered w . r . t the output vector
code: min_avail = 1 NEW_LINE pos_of_I = 0 NEW_LINE