refine comment and finename, actually it not linear but nlgn solution