Sort vector to get top n weights