[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

alternative to Array#index?

warhero

6/25/2007 11:06:00 PM

is there an alternative to Array#index? Faster version maybe?

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

1 Answer

Alex Young

6/26/2007 7:16:00 AM

0

Aaron Smith wrote:
> is there an alternative to Array#index? Faster version maybe?
>
Change the problem so that you're reading from a hash? Maintain an
index hash alongside the array? Keep the array sorted somehow? It
depends on the problem you're trying to solve, really...

--
Alex