Company: grow_25sep
Difficulty: medium
Good Subsequences Problem Description An array A has N elements, a 1 , a 2 , ..., a N . A subsequence of the array is called good if the bitwise OR of all the elements present in that subsequence is K. Find the maximum sum of all the indices of the elements present in a good subsequence. Note A subsequence is a sequence that can be derived from the array by removing zero or more elements, without changing the order of the remaining elements. Consider 1-based indexing. Function Description In the provided code snippet, implement the provided goodSubsequence(...) method to find the maximum sum of all the indices of the elements present in a good subsequence. You can write your code in the space below the phrase "WRITE YOUR LOGIC HERE". There will be multiple test cases running so the Input and Output should match exactly as provided. The base Output variable result is set to a default value of -404 which can be modified. Additionally, you can add or remove these output variables. Input F