What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-20 22:31:18
given an array a of n non-negative integers, count the number of unordered pairs
var debug = 0; function bruteForce(a){ let answer = 0; for (let i = 0; i < a.length; i++) { for (let j = i + 1; j < a.length; j++) { let and = a[i] & a[j]; if ((and & (and - 1)) == 0 && and != 0){ answer+... Add solution -