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

rewrite skiplist.c, a few bug fixes #534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qiuhaha
Copy link

@qiuhaha qiuhaha commented Jul 20, 2023

原本的skiplist.c文件有几个bug,特别是random_level()函数,原本的代码实际效果是返回MAX_LEVEL的1/2左右的值。新代码已编译运行测试过。
另外扫了一下,另一个子目录里的skiplist.c也有几个bug,包括获取随机层数的函数有上述同样的问题。
另一个SkipList.cpp文件的随机函数也是同样问题。

@emorys
Copy link

emorys commented Jul 20, 2023 via email

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

Successfully merging this pull request may close these issues.

2 participants