Given an integer array and an integer $k$, we have to count the number of pairs of elements from the array whose bitwise OR is $k$ in $O(n)$ time complexity. How could this be done?
3
-
1$\begingroup$ What did you try and where did you get stuck? $\endgroup$ – Juho Mar 2 '19 at 12:07
-
1$\begingroup$ Equivalent: discuss.codechef.com/questions/79843/str-editorial $\endgroup$ – xskxzr Mar 2 '19 at 12:13
-
$\begingroup$ Can you credit the original source where you encountered this problem? $\endgroup$ – D.W.♦ Mar 3 '19 at 19:46
Add a comment
|