Reading-Notes

View the Project on GitHub

Data structures

A term refers to how your data should be structured and the access fo the data and manipulating the data in the most efficient way.

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

Linked lists

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

Two types of liked lists:

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.

More

Types of data structures

### 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 and linked lists

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.

Growing a linked list

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

More

  1. https://medium.com/basecs/whats-a-linked-list-anyway-part-2-131d96f71996