Efficiency and performance: how much excecution time it will take, time and space complexity…
One of the applications that present data as: trees are google maps and Facebook
An example of data structre, Its a way to store data in a block chain.
A Linked list is a sequence of Nodes, each node(is devided into two parts) one contains data item and the other contains the reference (an address )of the next node.
the last node has no address (null)
the first node is called “Head”
Next -> a property that contains the reference of the next node
Current -> the current node
Traversal –> we go through the nodes and stop for each node to search for something, i will be traversing(walkig through nodes)
Traversal method is used instead of for loop, we can use while loop to help us know if the next nodes adress is null. -> we have to take care of that using an exception to **NillReferenceException.
includes: when we want to check for a value if it exists or not in nodes, we use traversal for looking.
linear data structures A sequence and an order to how data are constructed and traversed.
non-linear data structures items don’t have to be arranged in order, which means that we could traverse the data structure non-sequentially.
### Memory management
When an array is created, it needs a certain amount of memory(bytes), one byte next to the another, all together, in one place.
But with linked lists One byte could live somewhere, while the next byte could be stored in another place in memory altogether!
Big O Notation is a way of evaluating the performance of an algorithm.
There are two major points to consider when thinking about how an algorithm performs: how much time it requires at runtime given how much time and memory it needs.
Inserting an element at the beginning of a linked list is particularly nice and efficient because it takes the same amount of time, no matter how long our list is, which is to say it has a space time complexity that is constant, or O(1).
a linked list is usually efficient when it comes to adding and removing most elements, but can be very slow to search and find a single element.1
https://medium.com/basecs/whats-a-linked-list-anyway-part-2-131d96f71996 ↩