#3314
Construct the Minimum Bitwise Array I
newbie · 130 · lc easy +13 · 85.3% accepted · 414 likes · top 96%
Description
You are given array nums of prime integers. Construct array ans where ans[i] OR (ans[i] + 1) == nums[i] and ans[i] is minimized. Set ans[i] = -1 if no valid value exists.
Code
1
2
3