Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XOR Linked List; traversal #314

Open
rishabharoraa opened this issue Oct 16, 2020 · 1 comment
Open

XOR Linked List; traversal #314

rishabharoraa opened this issue Oct 16, 2020 · 1 comment

Comments

@rishabharoraa
Copy link

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.
@rishabharoraa
Copy link
Author

Please assign this issue to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant