skipList
This commit is contained in:
13
List/skipList/skipNode.h
Normal file
13
List/skipList/skipNode.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <utility>
|
||||
template <class K, class E>
|
||||
class skipNode {
|
||||
public:
|
||||
std::pair<K, E> element;
|
||||
skipNode<K, E>** next; //指针数组 -> 高速公路
|
||||
//指针数组记录 该节点 在每一层的 下一个节点。
|
||||
public:
|
||||
skipNode(const std::pair<K, E>& thePair, int size) : element(thePair) {
|
||||
next = new skipNode<K, E>* [size];
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user