Cody

Problem 2991. Finding an element in a vector

x is a vector of unknown length

your function should return the index of the first element in the vector that is greater than 6. If all elements in x are less than 6, the function should return 'none'

example: x = [1 2 7 2 3 2 4 8 6]

output = 3

Solution Stats

42.4% Correct | 57.6% Incorrect
Last Solution submitted on Sep 20, 2019

Problem Comments