Skip to content

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