Merge Two Sequences Without Duplicates Preserving Relative Order

Given two integer sequences A and B, for example:

A = 1, 2, 15, 8
B = 2, 4, 7, 8

Determine whether they can be merged into a single sequence with no duplicate numbers, such that the rela...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: