Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/160.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 需要有关跳过列表的信息吗_C++_Data Structures_Skip Lists - Fatal编程技术网

C++ 需要有关跳过列表的信息吗

C++ 需要有关跳过列表的信息吗,c++,data-structures,skip-lists,C++,Data Structures,Skip Lists,在这样的跳过列表中: 元素4是否可以访问第二个和第三个列表中的自身?我问这个问题的原因是因为我正试图找出如何实现跳过列表的删除操作。谢谢是的,在跳过列表中,每个指针都有一些方法可以让您找到实际的条目。通常,您可以通过让每个指针指向条目本身而不是某个条目中的链表单元格来实现这一点。只要记住当前的深度,就可以通过索引到存储在下一个单元格中的指针数组,继续沿着链表进行操作 例如: struct Cell { Cell* pointers[]; // Each points to the ro

在这样的跳过列表中:


元素4是否可以访问第二个和第三个列表中的自身?我问这个问题的原因是因为我正试图找出如何实现跳过列表的删除操作。谢谢

是的,在跳过列表中,每个指针都有一些方法可以让您找到实际的条目。通常,您可以通过让每个指针指向条目本身而不是某个条目中的链表单元格来实现这一点。只要记住当前的深度,就可以通过索引到存储在下一个单元格中的指针数组,继续沿着链表进行操作

例如:

struct Cell {
    Cell* pointers[]; // Each points to the root of a new Cell
    Type data;
};
希望这有帮助