This commit is contained in:
e2hang
2025-07-30 14:10:58 +08:00
parent eccb13de21
commit c77f685f1f
4 changed files with 170 additions and 0 deletions

13
List/skipList/skipNode.h Normal file
View 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];
}
};