We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb49c60 commit d674a36Copy full SHA for d674a36
BitwiseOperators.js
@@ -0,0 +1,10 @@
1
+var getMaxLessThanK= function(n,k){
2
+ let max_v=0;
3
+ for(var i=1;i<n;i++){
4
+ for(var j=i+1;j<n+1;j++){
5
+ if(Number(i&j)<k && Number(i&j)>max_v)
6
+ max_v=i&j;
7
+ }
8
9
+ return max_v
10
+}
0 commit comments