Buscar

Regarding the insertion of a new key in a binary search tree, which of the following statements is correct? Every new key is inserted only in the...

Regarding the insertion of a new key in a binary search tree, which of the following statements is correct?


Every new key is inserted only in the root.
To determine the position of the new key, it is necessary to calculate the in-order traversal of the obtained tree. With this traversal, it is checked if the sequence is sorted in ascending order. If it is, the position of the new key is correct.
The insertion algorithm in binary search trees is static, meaning that the entire tree needs to be recalculated to insert a new key.
All keys are inserted in leaves, and the position of the leaf is determined by the search.
The complexity of the insertion is always O(n), regardless of the height of the tree.

💡 1 Resposta

User badge image

Ed Verified user icon

A alternativa correta é: "All keys are inserted in leaves, and the position of the leaf is determined by the search." (Todas as chaves são inseridas em folhas, e a posição da folha é determinada pela busca.)

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais