Sum at Set Bit Indices
Given an integer array nums and an integer k, sum the elements at indices whose binary representation contains exactly k set bits. A set bit is a bit with value 1. Return the resulting sum.
Given an integer array nums and an integer k, sum the elements at indices whose binary representation contains exactly k set bits. A set bit is a bit with value 1. Return the resulting sum.