[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: worst case time using hash-tables in Lua
- From: 云风 Cloud Wu <cloudwu@...>
- Date: Fri, 15 May 2020 17:13:44 +0800
Philippe Verdy <email@example.com> 于2020年5月12日周二 下午5:58写道：
> As I replied in another message, it is absolutely NOT necessary to have ANY chaining pointer per node: collision lists can just add (resp. substrict) a constant prime to the current node index (and take the result module the hash table size), to find the next (resp.) previous node in the chain, until you find the node with the correct hash or a null node.
I think we should distinguish a null node and a node with value nil,
because set a node to nil may break the chain. And the terminal
condition should including back to the main position, because at the
worst case , the chain may not end by a null node.
lua-l mailing list -- firstname.lastname@example.org
To unsubscribe send an email to email@example.com