MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayAll points except for one lie on a line. Which one is the outlier?

Example:

You are given a list of x-y pairs in a column like this:

pts = [ 0 1 0 2 3 2 0 3 0 4 ]

You would return the number 3, since the third point is the only one that is non-collinear with the other points. All the others are on the y-axis.

outlier = 3

178 correct solutions
326 incorrect solutions

Last solution submitted on Sep 12, 2014

3 players like this problem

1 Comment

Jean-Marie SAINTHILLIER
on 20 Sep 2012

Doesn't work with outlier in first position.

1 Comment

Christopher
on 11 Jun 2012

Could have been MUCH smaller, but corrcoef doesn't like x=0 the first test case.

1 Comment