Skip to content

Commit 1057d0c

Browse files
authored
consist of basic operations.😃
1 parent ae48866 commit 1057d0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
#### bitwise operator leftshift {<<} : (100 << 2 = 400)
1313

1414
-------------------------------------------------------------------------------------
15+
### sum of n numbers:O(1)
16+
```python
17+
def sum_total(n):
18+
return int(n*(n+1)/2)
19+
```
1520
### Odd-Even:O(1)
1621
```python
1722
if n&1 == 1:

0 commit comments

Comments
 (0)