Get Distinct Goodness Values
Problem Overview
- Find all distinct "goodness" values, where goodness is the bitwise-OR of any strictly increasing subsequence of the array, and return them in non-decreasing order.
- Input: int arr[n]; Output: int[] of distinct goodness values; constraints are unspecified (TO-DO).
- Domain: bitwise operations and subsequence selection on arrays.
- A Citadel interviews coding interview problem and interview question assessing understanding of bitwise OR and result sets.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
