title: How to find longest increasing sequence starting at each position within the array in O(n log n) time,
body: <p>How could we find longest increasing sub-sequence starting at each position of the array in     O(n log n) time, I have seen techniques to find longest increasing sequence ending at each position of the array but I am unable to find the other way round.</p>
  
  <p>e.g.
  for the sequence " 3 2 4 4 3 2 3 "
  output must be   " 2 2 1 1 1 2 1 "</p>