Question: Which of the following operations on some built-in Python list lst has O(N) runtime complexity (assume that i and j are valid indices)? (a) len(lst)
Which of the following operations on some built-in Python list lst has O(N) runtime complexity (assume that i and j are valid indices)?
(a) len(lst)
(b) lst[i] = x
(c) x = lst[j]
(d) lst[i:j] = []
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
