Minimum Non-Zero Product of the Array Elements
You are given a positive integer p. Consider an array nums (1-indexed) that consists of the integers in the inclusive range [1, 2^p - 1] in their binary representations. You are allowed to do the following operation any number of times:
Choose two elements x and y from nums. Choose a bit in x and swap it with its corresponding bit in y. Corresponding bit refers to the same position in different numbers. If you apply the operation to nums at least once, then the product of nums will change.
Return the minimum non-zero product of nums. Since the answer may be too large, return it modulo 10^9 + 7.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)