Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Manas Sambare
Incorrect Test Case

Manas Sambare

May 6, 2024

The question states "Given ‘M’ sorted arrays", however, there is a test case that contradicts this statement.

Input: [[1, 2, 3], [4, 13, 6], [7, 2, 7]] Expected: [3,7]

Even if we assume that we sort these arrays to form:

Input: [[1, 2, 3], [4, 6, 13], [2, 7, 7]]

Shouldn't the expected answer be:

Expected: [2,4]

Since '2' exists in array 0 and 3, and '4' exists in array 1?

3

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

Thanks for the suggestion! It is fixed.