Devise an efficient algorithm that finds the intersection of two
ordered linked lists (i.e. the list of values that appear in
both lists) and prints it in order. The algorithm must visit
each node in both lists at most once.
Hint- consider the use of a cursor.