Data Structures(linkedList, Tree, …)

So Data structures basically is concept that we use to store data in a different way so i will try to explain the Tree hoping that you understand the others because they work on the same flow so focus with me.


actually behind the scene a tree is an object a mother object why i called it a mother ? yeah because it has children which are nested inside an array and each child of them has other children and so on, so the mother object will look like this : {key:value,[{},{},{}]}, you can see those 3 object no ! those are the children so will consider each one of them as a mother for other children because each object of them have the same data as his mother until we reach a children that has an empty arrays and the tree ends there.

basically that’s the tree i hope you understood the concept.