给定两个排序的链表L1和L2,计算它们的交点L1交点L2的解决方案.
L1_node = L1.head; L2_node = L2.head; Result = new SList; while L1_node != NULL and L2_node != NULL: if L1_node.value == L2_node.value: Result.append(L1_node.value) L1_node = L1_node.next L2_node = L2_node.next elif L1_node.value < L2_node.value: L1_node = L1_node.next else L2_node = L2_node.next
(自己翻译成C语言.)