This question evaluates understanding of linked list manipulation, algorithmic reasoning for merging sorted sequences, and the ability to analyze time and space complexity while handling edge cases such as empty lists and duplicate values.
Given the heads of two singly linked lists sorted in non-decreasing order, merge them into a single sorted singly linked list and return its head. Implement both iterative and recursive solutions, analyze time and space complexity, and handle edge cases such as empty lists and duplicate values.