Cody

Problem 45449. Quarantine Days

Solution 2286500

Submitted on 16 May 2020 by Binbin Qi
  • Size: 27
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
Start=[0,6,8,10,15,22]'; Finish=[6,7,9,16,21,23]'; x=table(Start,Finish); assert(isequal(activity_2(x),5))

2   Pass
Start=[0,5,8,10,15,22,23,3,11,16]'; Finish=[6,8,11,11,17,24,24,4,16,18]'; x=table(Start,Finish); assert(isequal(activity_2(x),6))

3   Pass
Start=[0,5,8,10,15,22,23,3,11,16,5,12,14]'; Finish=[6,8,11,11,17,24,24,4,16,18,10,13,16]'; x=table(Start,Finish); assert(isequal(activity_2(x),7))

4   Pass
Start=[1,12,16,21,11]'; Finish=[11,13,18,24,17]'; x=table(Start,Finish); assert(isequal(activity_2(x),4))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!