Algorithm · DoorDash · Medium
Requirements Given two ordered lists, a and b, containing restaurant names, implement: Return the longest sequence of restaurant names that appears in both lists while maintaining the original ordering within each list. The result should contain the names themselves, not merely the sequence length. After moving past an item in either list, that item cannot be selected later; selections must therefore respect strict relative order. Examples Example 1 Input: Output: Nori and…
Checking your access…