is used to describe the efficiency of an algorithm or function,This efficiency is evaluated based on 2 factors:
- run time : the amount time to running algorithm
- space: The amount of memory resources a function uses to store data and instructions.
to analyzing big o we shoud consider 4 Key Areas for analysis:
- Input Size: he size of the parameter values that are read by the algorithm
- Units of Measurement: evaluate a function for Time and Space complexity
the Running Time:
- The time in milliseconds from the start of a function execution until it ends
- The number of operations that are executed
- The number of “Basic Operations” that are executed In order to quantify Memory Space
- The amount of space needed to hold the code for the algorithm.
- space of input
- space of outout
- working space
- Orders of Growth
- Best Case, Worst Case, and Average Case
A Linked List is a sequence of Nodes that are connected/linked to each other
The best way to approach a traversal is through the use of a while() loop
while(next != null):
------
- Singly Linked list.
- Doubly Linked list.
- Circular Linked list.
- Doubly Circular Linked list.
deferent between array and linked list is if i need to store array with 7 element it take 7 bytes, but linked list need just 1 bytes.