Big O notation Flashcards
1
Q
Insert a new data item into a Stack implemented by array.
A
O(1)
2
Q
Delete the last inserted item from a Stack implemented by array
A
O(1)
3
Q
Insert a data item into an Ordered Array
A
O(n)
4
Q
Delete an arbitrary data item from an Ordered Array
A
O(n)
5
Q
Delete the least recently inserted data item from a Queue implemented by array
A
O(1)
6
Q
Insert a new data item into a Priority Queue implemented by array
A
O(n)
7
Q
Delete any one data item from an unordered array
A
O(n)
8
Q
Search for a value in ordered array using binary search.
A
O(logn)
9
Q
push a new data item into Stack
A
0(1)
10
Q
Pop the top one from the Stack
A
O(1)
11
Q
Enqueue a new data item into the Queue
A
O(1)
12
Q
Dequeue the front data item from the queue
A
O(1)
13
Q
O
A
14
Q
A
15
Q
A