mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
skip_list
This commit is contained in:
parent
2fb95a2bf3
commit
420915fa0d
@ -9,6 +9,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
// using namespace std;
|
// using namespace std;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
@ -59,6 +61,8 @@ SkipList::SkipList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns random level for skip list;
|
* Returns random level for skip list;
|
||||||
*/
|
*/
|
||||||
@ -187,4 +191,6 @@ int main()
|
|||||||
|
|
||||||
lst.displayList();
|
lst.displayList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user