& is very different from &&. Similarily | is very different from ||
& or | work on integers performing the operator on each corresponding bits. However, && or || work on boolean values ( Any non zero value is true ) to produce a boolean result.Example :
2 | 1 = 3
2 || 1 = true
2 & 1 = 0
2 && 1 = true
A = A + B as A += B, A = A | B as A |= B orA = A & B as A &= B
| Problem | Score | Companies | Time | Status |
|---|---|---|---|---|
| Number of 1 Bits | 200 |
|
8:47 | |
| Trailing Zeroes | 200 |
|
14:58 | |
| Reverse Bits | 225 |
|
23:50 | |
| Divide Integers | 250 |
|
68:08 | |
| Different Bits Sum Pairwise | 300 |
|
51:30 |
| Problem | Score | Companies | Time | Status |
|---|---|---|---|---|
| Min XOR value | 200 |
|
37:42 | |
| Count Total Set Bits | 200 |
|
66:25 | |
| Palindromic Binary Representation | 200 |
|
65:16 | |
| XOR-ing the Subarrays! | 200 |
|
34:54 |
| Problem | Score | Companies | Time | Status |
|---|---|---|---|---|
| Single Number | 275 |
|
11:53 | |
| Single Number II | 275 |
|
39:22 |