Very fine , 1. At a time a man is given choices to either play or to read alternatively. i.e. if in ith day he was reading then he cannot read on (i+1)th day. But not both simultaneously .
You are given an array of the possible activities of each day in form of 0,1,2,3. 0 represents he cannot do anything, 1 represents he can read only, 2 represents he can play only and 3 represents he can read and play both. So, you have to find the maximum no of activities he can do for n days.
Input:- 2 2 2 2
Output: 2
Explanation:- Possible cases: 1) 2 0 2 0
2) 0 2 0 2