This question evaluates proficiency in pointer manipulation, deep-copy semantics, and analysis of time/space complexity when working with complex linked-list structures in the Coding & Algorithms domain.

Given the head of a singly linked list where each node has next and random pointers, create a deep copy of the list. First provide an O(n) time, O(n) extra space solution using a hash map from original nodes to copies. Then implement an O(n) time, O(