006/

directory
v0.0.0-...-1f145c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2022 License: MIT

README

Problem:  #006

Open for Review Golang MIT License

Date: September 08, 2020
This problem was asked by Google.

An XOR linked list is a more memory efficient doubly linked list. Instead of each node holding next and prev fields, it holds a field named both, which is an XOR of the next node and the previous node. Implement an XOR linked list; it has an add(element) which adds the element to the end, and a get(index) which returns the node at index.

If using a language that has no pointers (such as Python), you can assume you have access to get_pointer and dereference_pointer functions that converts between nodes and memory addresses.

Solution(s):
      • C++
      • Golang

People find their paths in the strangest of ways. Let's find our own!
Let's connect here.

Directories

Path Synopsis
Package solution contains Solution to Challenge #006, run TestSolution for test cases
Package solution contains Solution to Challenge #006, run TestSolution for test cases

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL