Pergunta de entrevista da empresa Amazon

What is the look up time for a tree?

Respostas da entrevista

Sigiloso

28 de jan. de 2014

O(log n) if it's a binary tree and balanced.

Sigiloso

2 de jan. de 2014

O(n) worst case without constraints. O(log n ) worst case if balanced.