TRAINING CATEGORIES
TRAINING PROGRAMS
Difficulty Level: EASY
Problem Statement:
Given a binary array arr[] of size N, which is sorted in non-increasing order, count the number of 1’s in it.
Input:
arr[] = {1, 1, 1, 1, 0, 0, 0}
Output:
4
We use cookies to make interactions with our websites and services easy and meaningful. Please read our Privacy Policy for more details.