Linked list
linear data structures, which means that there is a sequence and an order to how they are constructed and traversed.
The following are the types of linked list:
Singly Linked list Doubly Linked list Circular Linked list Doubly Circular Linked list
Singly Linked list
It is the commonly used linked list in programs. If we are talking about the linked list, it means it is a singly linked list. The singly linked list is a data structure that contains two parts, i.e., one is the data part, and the other one is the address part, which contains the address of the next or the successor node. The address part in a node is also known as a pointer.
Suppose we have three nodes, and the addresses of these three nodes are 100, 200 and 300 respectively. The representation of three nodes as a linked
Big O determine how much the time & space we need to run this algorithm. is a way of evaluating the performance of an algorithm.
O(n) : means that as our input grows, the space and time that we need to run that algorithm grows linearly. O(1) : means i need a constant time & and same space, and doesn’t matter how much the elements we have or how huge our input is.
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.
Big-O Analysis of Algorithms
We can express algorithmic complexity using the big-O notation. For a problem of size N:
A constant-time function/method is “order 1” : O(1) A linear-time function/method is “order N” : O(N) A quadratic-time function/method is “order N squared” : O(N 2 )