Abinoam Jr. wrote in post #1136127:
> Great and you're welcome!
>
> One more thing.
> I forgot to pass the url of a gist created to benchmark the 3 approachs.
>
> https://gist.github.com/abinoam/8898249
>
> Abinoam Jr.

FYI - I wrote the below code, but it wouldn't give the desired result as 
I mentioned in main post.

def del_first_three(a)
  num_to_del = a.find { |e| a.count(e) >= 3 }
  return a if num_to_del.nil?
  3.times do
    ind = a.index { |e| e == num_to_del }
    a.tap { |ob| ob.delete_at(ind) }
  end
end

del_first_three([3,4,5,3,3]) # => 3 # <~~~ see the output,due to #times.

So don't consider this.

-- 
Posted via http://www.ruby-forum.com/.