Sail E0 Webinar
Question
When it would be optimal to prefer Red-black trees over AVL trees?
Options:
A .  when there are more insertions or deletions
B .  when more search is needed
C .  when tree must be balanced
D .  when log(nodes) time complexity is needed
Answer: Option A


Though both trees are balanced, when there are more insertions and deletions to make the tree balanced, AVL trees should have more rotations, it would be better to use red-black. but if more search is required AVL trees should be used.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers