data structure is a way to organize your toys so the will be reachable without any effort and they have multiple types
1. stack : so the stack method allows you to stak your toys on top of each other but the biggest flaw in this method is if you put a toy first and then put above it multiple toys but you want to get the first one you have to pull out all the toys in order to reach the first one.
2. Queue : this method also called (first one in first one out (FIFO) it's really self explanatory.
3. Tree: in this method you have a toy which has children of multiple toys and so on and so furth,
4. Linked List: it allows you to store your toys in an array like style with pointers pointing to the next toy, it has many flaws one of them if you wanted to add toys you have to add them at the end and when you search if you miss the toy you are looking for then you have to start again.
5: sets: they are great but you cannot store the same toy twice.
the rest are too complicated for you to understand. data
No comments:
Post a Comment