Search
⌘K

Leetcode 2505. Bitwise OR of All Subsequence Sums

Given an integer array, compute the bitwise OR of the sums of every possible subsequence. The challenge is to decide which bit positions can appear in some subset sum—taking carries across bits into account—efficiently without enumerating 2^n subsets, using bitwise/greedy or knapsack-like reasoning.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.