Given a vector which only contains 0s and 1s, find the maximum number of consecutive 1s.
Answers
Answered by
1
Answer:
Step-by-step explanation:
Input : n = 14
Output : 3
The binary representation of 14 is 1110.
Input : n = 222
Output : 4
The binary representation of 222 is 11011110.
Hope it helps you...
Similar questions