Questão de Estrutura de Dados

Analize the following statements about the complexity of operations in a data structure: O(n), O(n) and O(1).


The search operation has a complexity of O(n) because in the worst case scenario you will have to traverse the entire list sequentially until you find the last element.

The insertion operation, in its worst case scenario, will place an element at the beginning of the list, forcing all others to be shifted one position, taking O(n) operations.

The removal operation also has, in its worst case scenario, to remove the first element, which will force all others to be shifted one position, taking O(n) time.

A
Only statement 1 is correct.
B
Statements 1 and 2 are correct.
C
Statements 2 and 3 are correct.
D
All statements are correct.
E
None of the statements are correct.

Ainda não há comentários para esta questão.

Seja o primeiro a comentar!

Aulas em vídeo Em breve

00:00

Tópicos Relacionados