k largest(or smallest) elements in an array