File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 6
6
## ** Referance:** [ Competetive programming with python] ( https://www.youtube.com/playlist?list=PLS1QulWo1RIZZc0V_a8cEuFFkF5KbGlsf )
7
7
8
8
------------------------------------------------------------------------------------
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)
13
13
14
14
-------------------------------------------------------------------------------------
15
15
### Odd-Even: O (1)
@@ -52,7 +52,7 @@ def inttobin(n):
52
52
def bintoint (m ):
53
53
return int (m,2 )
54
54
```
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)
56
56
``` python
57
57
def checkpair (arr ): # n -> aray
58
58
temp = arr[0 ]
You can’t perform that action at this time.
0 commit comments