Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这里岂不是在索引层就直接遍历到查找的节点了,无须下沉到第一层去找了 #523

Open
evilkevinhe opened this issue Apr 4, 2022 · 1 comment

Comments

@evilkevinhe
Copy link

for(i = list->level - 1; i >= 0; i--)
{
while(((tmp = prev->next[i]) != NULL) && (tmp->key <= key))
{
if (tmp->key == key)
{
*value = tmp->value;
return 0;
}
prev = tmp;
}
}

@evilkevinhe
Copy link
Author

@jinshaohui 朋友跟你学习一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant