Maximum Consecutive Ones

Given a binary array nums, find the maximum number of consecutive 1s in the array.

<svg viewBox="0 0 200 28" xmlns="http://www.w3.org/2000/svg"> <text x="0" y="20" font-family="monospace" font-size="16" fill="currentColor">1 1 0 [1 1 1] → max = 3</text> </svg>
Examples
Input: [1,2,3]
Output: 1
Hints

Maximum Consecutive Ones

Given a binary array `nums`, find the **maximum number of consecutive 1s** in the array.