In this section, we will implement our own naive data structure class using Java language (There can be a more clever implementation but this is for simple explanation only).
Note: These implementations are naive and simple, haven't been thoroughly tested, please do not use in production, it is meant for simple explanation only.
Tree is implemented using pointers/references and can have certain property. We will implement binary tree here.
In these examples, we are just trying to store integers and string and organise them using a structure so we can see how they are stored. We can see that there is some strength and weakness in each structure. There are many ways to implements these data structure and we will see some way of implementation in these examples but there are more clever ways to implement them.