Cody

Problem 2121. Find offset of given matrix element from first matrix element

Created by Swapnali Gujar in Community

Given matrix m and an element of that matrix, return the offset from its first element. e.g. m=[11 2 34; 40 51 6; 87 8 109] element = 51 Then, offset = 5

Return 0, if that element if not a matrix element

Solution Stats

38.98% Correct | 61.02% Incorrect
Last solution submitted on Apr 10, 2019

Problem Comments