What will be the output?
stack = [] stack.append(10) stack.append(20) stack.append(30) print(stack.pop())
stack = [] stack.append(10) stack.append(20) stack.append(30) print(stack.pop())
Anonymous Quiz
18%
10
22%
20
60%
30
❤2
What will be the output?
Python
from collections import deque queue = deque() queue.append(10) queue.append(20) queue.append(30) print(queue.popleft())
Python
from collections import deque queue = deque() queue.append(10) queue.append(20) queue.append(30) print(queue.popleft())
Anonymous Quiz
47%
10
34%
20
19%
30
❤1
What is the time complexity of accessing an element by index in an array?
numbers = [10, 20, 30, 40] print(numbers[2])
numbers = [10, 20, 30, 40] print(numbers[2])
Anonymous Quiz
46%
O(1)
54%
O(n)
❤1
Which searching algorithm requires the data to be sorted before searching?
Anonymous Quiz
49%
Linear Search
51%
Binary Search