Linked List
Often called node base data structure(type fo container) - So its an
node that contnateins a value** and
refrence to another value/node $$$$ - Every linked list is a graph
>[!example]- Signly link list a only points forwaords there no
refrence backworks
>
- Isertion and deltion are very fast
- There’s no index (u have to manulay step over the value u want to finde)
- Dleation in the middle can be costly becouse u have to ==travers== to the value
- dobule link list can look backwards
- Inseration and delation is always O of N
- U just have to breake 4 links
- They are all constants no matter the value or the size u
have to set .nexts and .previous
- Inseration
- Delition (the order of operations is extremaly importat)
- Add check statment weather (A or B are real)
- Inseration
Head and tail
The linked list has a special refrence that points to the beginning and the end of a list
Summary
- prepend/append constant time cheap
- insetion in the middle traversing costly
- dleation from the end constant time cheap
- dealtio in the middle traversing costly
- Get head/tail constant time cheap
- Get in gerneral
>[!bug] Theres no hopping on a linked list only travesting