Company: Intuit_7aug
Difficulty: medium
AND Product of Subsequences Problem Description You are given an array of N integers and your task is to calculate the sum of AND-Products of all possible two-element subsequences of the array. A subsequence is defined as a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. For each subsequence, you need to compute the AND-Product, which is the result of performing a bitwise AND operation on both elements within that subsequence. Once the AND-Products of all possible subsequences are calculated, you should sum them up to get the final result. Please refer to the examples for understanding of the problem. Your solution should implement the following function signature: long solve(vector<int> arr) { // Write your code here return 0; // Placeholder } Examples Example 1: Input: arr = [1,2,3] Output: 9 Explanation: The answer is calculated as a summation of six subsequences as follows: AND-Product(1,