Yes, but I would say no. For efficiency, they should not have different nodes with duplicate values ββor they lose their purpose (you have to look for child nodes, etc.). However, you can create each node to contain a variable that declares how many copies of this value you have in your data.
Again, this is my opinion. If this is a bad way to do this, I would like someone to explain why. I just need to do some performance testing. If you store simple data types such as int, I would see that it is less efficient, but for larger objects that have identifiers, it was nice.
zgc7009
source share