Skip to content

Commit 51b2d60

Browse files
author
Vimal A R
committed
Big-O - Interviecake
1 parent 4603104 commit 51b2d60

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Day-111/big_O-1.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env python3
2+
3+
# Big O example 1
4+
5+
# O(1) or Constant time
6+
7+
items = ["bread", "milk", "scuba mix", "fruittella", "rice", "cucumber", "bonne mamman fig jam"]
8+
9+
def print_first_item(items):
10+
print(items[0])
11+
print(items[2])
12+
print(items[6])
13+
14+
print("m,n guyh ckuof8uyt clg8ruyt8r594dyt8ilrcf4ylhuynir")
15+
16+
17+
print_first_item(items)
18+
19+

0 commit comments

Comments
 (0)