Question: Write a function called MCAS_list that takes as input - a 1-dimensional numpy array X of 0 's and 1 's and returns as output

Write a function called MCAS_list that takes as input - a 1-dimensional numpy array X of 0 's and 1 's and returns as output - a list Lengths which contains a list of the lengths of every maximal contiguous atternating subsequence of in X Important: Your function should be completely solf-contained and should rely on no othor user-defined functions. In I I Code cell for problen 2 - do not remove or modify thas line def MCAS_list (X); return(Lengths)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
