Graphs can be implemented using
(i) Arrays
(ii) Linked list
(iii) Stack
(iv) Queue
Graphs can be implemented using:-
1)Arrays
2)Queue
A graph is a pictorial representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by points termed as vertices, and the links that connect the vertices are called edges.
1) An array is a data structure consisting of a collection of elements each identified by at least one array index or key. This type of data structure is a linear array, also called a one-dimensional array.
2) A Queue is a linear structure which follows a particular order in which the operations are performed. The order is first in first out (FIFO). In a stack remove the item the most recently added; in a queue, remove the item the least recently added.