Leetcode 2527. Find Xor-Beauty of Array
Given an integer array nums, compute the xor-beauty defined as the XOR of ((nums[i] | nums[j]) & nums[k]) over all ordered triplets (i, j, k). With n up to 1e5, a brute-force O(n^3) is infeasible — the challenge is to exploit bitwise independence/parity to reduce the computation to linear-time aggregation of bit contributions.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.