find top k with select rank algorithm