Saturday session quiz 5

1.) What is the worst case time complexity?
a.) O(n)
b.) O(1)
c ) O(logn)
d.) O(nlogn)

2.) What is the best case time complexity?
a.) O(n)
b.) O(1)
c ) O(logn)
d.) O(nlogn)

3.) What is the syntax of replace?
a.) variable name ( element to replace , with what to replace)
b ) ( element to replace , with what to replace)
c.) variable name.replace ( element to replace , with what to replace)
d.) None of above

4.) If element is not present in slicing, will it throw a error ?
list1 = [1,2,3,4,5,6,7]
print(list1[:8:])

a.) yes
b.) no

5.) If element is not present in indexing, will it throw a error ?
list1 = [1,2,3,4,5,6,7]
print(list1[8])

a.) yes
b.) no

1 Like

1.) What is the worst case time complexity?
a.) O(n)
2.) What is the best case time complexity?
b.) O(1)
3.) What is the syntax of replace?
c.) variable name.replace ( element to replace , with what to replace)
4.) If element is not present in slicing, will it throw a error ?
list1 = [1,2,3,4,5,6,7]
print(list1[:8:])
a.) no
5.) If element is not present in indexing, will it throw a error ?
list1 = [1,2,3,4,5,6,7]
print(list1[8])
a.) yes

2 Likes

1). a
2). d
3). c
4). b
5). a

1 Like

1). a
2). d
3). c
4). b
5). a

1 Like

1 . a
2 . d
3 . c
4 . b
5 . a

1 Like

1). (a)
2). (b)
3). (c)
4). (b)
5). (a)

1 Like

Amazing guys, Keep it up

1.a
2.d
3.(c)
4.(b)
5.(a)

1 Like