Re: Java questions: Urgent
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 04:21:44 GMT
On 30 Jan 2006 20:08:31 -0800, "Nikil Joshi" <kiranpannu@xxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :
>1, how fast is hash map? explain in terms of time complexity?
It depends on how relatively full it is. If you keep it less that 3/4
full your chains will be short and it wont' take any more time to look
up in a big list as a small. But if you let it approach 100% full,
then chains can get very long. In the most pathological case when all
your hashes are equal the lookup time is proportional to N, the size
of the list since all item are one one chain.
See http://mindprod.com/jgloss/hashcode.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- Follow-Ups:
- Re: Java questions: Urgent
- From: Luc The Perverse
- Re: Java questions: Urgent
- References:
- Java questions: Urgent
- From: Nikil Joshi
- Java questions: Urgent
- Prev by Date: Re: Any Checkstyle users?
- Next by Date: Re: Java questions: Urgent
- Previous by thread: Java questions: Urgent
- Next by thread: Re: Java questions: Urgent
- Index(es):