Problem 67. Find common elements in matrix rows
Given a matrix, find all elements that exist in every row.
For example, given
the answer would be the vector '2 5'. Elements should be returned sorted ascending.
Note there is no guarantee that there are any such elements; if there are none, the routine should return the empty set. Also, the matrix might contain NaNs, repeats, or very large or very small elements.
Solution CommentsShow comments
Problem Recent Solvers2409