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.

貢獻者指南