technojam/Ultimate_Algorithms_Repository

XOR Linked List; traversal

开放

#314 创建于 2020年10月16日

 (1 条评论) (0 个反应) (0 位负责人)C++ (165 个派生)auto 404
hacktoberfest

仓库指标

星标
 (87 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

XOR Linked List

  • In a doubly linked list, you store two pointers per node: prev and next. In an XOR linked list, you store one pointer per node, which is the XOR of prev and next, or if one of them is absent, just the other, which is the same as XORing with 0.
  • The reason why you can still traverse an XOR linked list in both directions relies on the properties of XOR and the redundancy of information inherent in a double linked list.

贡献者指南