Your algorithm must have the running time


Write an algorithm (pseudocode) to find the intersection of two singly-linked lists. Assume that the data in each list are in nondecreasing order. The result is one singly-linked list, containing the intersection elements in nondecreasing order. Let n be the number of elements in the longest input list. Your algorithm must have the running time O(n). For example, if the lists are 3, 6, 6, 10, 45, 45, 50 and 2, 3, 10, 15, 45, 55, 60, then the result is 3, 10, 45.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Your algorithm must have the running time
Reference No:- TGS0131839

Expected delivery within 24 Hours