← ALL NOTES
Array

2044. Count Number of Maximum Bitwise-OR Subsets

Given nums, count the non-empty subsets whose bitwise OR equals the maximum possible — which is the OR of the entire array. DFS over subsets with a prune: once the running OR hits the max, every…

Loading…