def max_elements_by_without_block(arr)
      arr.compact!
      return [] if arr.empty?
      max_elements = [arr.shift]
      arr.each do |e|