You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: From Basic to Intermediate: Queues, Lists, and Trees (V).
So, if a list solves the problem of queues and can even replace them in many situations, why do we need trees? And what role do they play in all of this? Well, dear reader, trees are the natural evolution of lists, and they have an even nobler purpose. "Okay, but I still don't understand. Could you explain this in more detail before we start looking at the code?" Of course I can. I think that understanding the purpose of trees before looking at the code will help you understand the code itself. To understand trees, you need to understand the problem of lists. Yes, and although they solve the problem of queues, lists themselves have their own problems. For this reason, another data structure was created that allows elements to be searched for more efficiently. Do you understand? How is that possible?
To understand this, imagine lists with thousands—perhaps even billions—of elements, a number that might seem unimaginable to most people. However, even lists containing several thousand elements can create problems when searching. The main problem is the time a search takes.
Author: CODE X