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

Learn moreOpportunities for recent engineering grads.

Apply Todaysuppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance. If input xyz =[3 4 2; 0 0 2; 0 1 2; 1 1 2; 1 1 20] then output w=25.

193 correct solutions
86 incorrect solutions

Last solution submitted on Jun 09, 2016

2 players like this problem

2 Comments

Michael
on 27 Jan 2012

Brilliant!

dangee
on 23 Jul 2012

Can you explain the problem. Walking from [3 4 2] to [0 0 2] gives (3-0)+(4-0) = 7 units. Then from [0 0 2] to [0 1 2] gives 1 unit. From [0 1 2] to [1 1 2] gives 1 unit and finally from [1 1 2] to [1 1 20] gives 18 units. So sum of distance is 7+1+1+18 = 27. Is it right?

2 Comments