Wednesday, October 23, 2013

[Amazon Interview] Copy of a linked list

Given a DLL, with next pointer pointing to the next node in the list and one arbit pointer which can point to any node, not just the previous one. Duplicate this linked list in O(n) time and O(1) space complexity.

1 comment: