Count total set bits in an array
Given an array arr, the task is to count the total number of set bits in all numbers of that array arr. Example: Input: arr[] = {1, 2, 5, 7}Output: 7Explanation: Number of set bits in {1, 2, 5, 7} are {1, 1, 2, 3} respectively Input: arr[] = {0, 4, 9, 8}Output: 4 Approach: Follow the below steps to solve this problem: Create a variable cnt to store