Given a binary array nums (containing only 0s and 1s), return the maximum number of consecutive 1s in the array.
Input: A binary integer array nums.
Output: Integer — maximum count of consecutive 1s.
Input: [1,1,0,1,1,1]
Output: 3
Explanation: Runs: [1,1]=2, [1,1,1]=3. Max=3.Input: [1,0,1,1,0,1]
Output: 2
Explanation: Runs: [1]=1,[1,1]=2,[1]=1. Max=2.Input: [1,1,1,1]
Output: 4
Explanation: No zeros. All 4 consecutive. Max=4.1<=nums.length<=10^5nums[i] is 0 or 1.