A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is less than 360. Find the 6 distances between the numbers including the distance from last to first number.
Example1:
- Input: [30 90 120 150 210 270]
- Result: [60 30 30 60 60 120]
Example2:
- Input: [140 220 260 320 380 440]
- Result: [80 40 60 60 60 60]
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers75
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
53241 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
871 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
400 Solvers
-
155 Solvers
-
Matlab Basics - Convert a row vector to a column vector
682 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
is the first test case result wrong? I think, it should be [60 30 30 60 60 120]
I think so too
I'm agree.
You are right.
I just changed the testcase, sorry!