Page 18 - DCAP201_FUNDAMENTALS_OF_DATA_STRUCTURES
P. 18
Unit 1: Data Structures
Let we consider graph of figure 1.5. Notes
Figure 1.5: A graph
2
1 3
5 4
Source: http://www.csbdu.in/econtent/DataStructures/Unit1-DS.pdf
From the above graph, we may observe that the set of vertices for the graph is V = {1,2,3,4,5}, and
the set of edges for the graph is E = {(1,2), (1,5), (1,3), (5,4), (4,3), (2,3)}. The elements of E are
always a pair of elements.
!
Caution The relationship between pairs of these elements is not necessarily hierarchical in
nature.
Self Assessment
Fill in the blanks:
10. A data structure is said to be ............................. if its elements form a sequence.
11. A ............................. array is a collection of similar data elements where each element is
referenced by two subscripts.
12. A ............................. is a linear structure in which items may be added or removed only at
one end.
13. A special queue known as ............................. allows insertion and deletion of elements at
both the end.
14. A linked list, or one-way list, is a linear collection of data elements, called .............................,
where the linear order is given by means of pointers.
15. A ............................. structures is one in which items of data are related by edges.
LOVELY PROFESSIONAL UNIVERSITY 11