mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-01 17:52:40 +08:00
skip-list documentation-polish
This commit is contained in:
@@ -70,7 +70,7 @@ SkipList::SkipList() {
|
||||
*/
|
||||
int SkipList::randomLevel() {
|
||||
int lvl = 0;
|
||||
while(static_cast<float>(rand())/RAND_MAX < P && lvl < MAXLVL) lvl++;
|
||||
while(static_cast<float>(std::rand())/RAND_MAX < P && lvl < MAXLVL) lvl++;
|
||||
return lvl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user