An Efficient Method for On-Line Cursive Handwriting Strokes Reordering