Skip to content

Commit 3cec5eb

Browse files
authored
consists of bitwise operators
1 parent 3a5a3f0 commit 3cec5eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
## **Referance:** [Competetive programming with python](https://www.youtube.com/playlist?list=PLS1QulWo1RIZZc0V_a8cEuFFkF5KbGlsf)
77

88
------------------------------------------------------------------------------------
9-
#### bitwise operator not - ~
10-
#### bitwise operator xor - ^ (n^n = 0), (n^0 = n)
11-
#### bitwise operator rightshift - >>
12-
#### bitwise operator leftshift - <<
9+
#### bitwise operator not - ~ : (a = 10 => 1010 (Binary) => ~a = ~1010 = -(1010 + 1) = -(1011) = -11)
10+
#### bitwise operator xor - ^ : (n^n = 0), (n^0 = n)
11+
#### bitwise operator rightshift - >> : (100 >> 2 = 25)
12+
#### bitwise operator leftshift - << : (100 << 2 = 400)
1313

1414
-------------------------------------------------------------------------------------
1515
### Odd-Even:O(1)
@@ -52,7 +52,7 @@ def inttobin(n):
5252
def bintoint(m):
5353
return int(m,2)
5454
```
55-
### check which number occurs once(or odd number of times/doesn't has it's unique identical element) in an array:
55+
### check which number occurs once(or odd number of times/doesn't has it's unique identical element) in an array:O(n)
5656
```python
5757
def checkpair(arr): # n -> aray
5858
temp = arr[0]

0 commit comments

Comments
 (0)