Question: Suppose we are given two n-element sorted sequences A and B that should not be viewed as sets (that is, A and B may contain
Suppose we are given two n-element sorted sequences A and B that should not be viewed as sets (that is, A and B may contain duplicate entries). Describe an O(n)-time method for computing a sequence representing the set A∪B (with no duplicates).
Step by Step Solution
3.44 Rating (170 Votes )
There are 3 Steps involved in it
The first element of the result is taken from A and the last one is taken from B Th... View full answer
Get step-by-step solutions from verified subject matter experts
