Professional Documents
Culture Documents
94. What are the conditions for pathk+1[i][j] to be true according to Warshall’s law?
pathk+1[i][j] is true if and only if one of the following two conditions holds:
pathk[i][j] == TRUE
pathk[i][k+1] == TRUE && pathk+1[k+1][j] == TRUE
95. What are the types of nodes in adjacency list representation of graphs?
Header nodes
List nodes or arc nodes
103. What are the two types of traversal applied to directed graphs?
• Depth first traversal
• Breadth first traversal
104. List some algorithms used to find the shortest path.
• Dijikstra’s Algorithm
• Warshall’s algorithm
108. Write a C program to find the factorial of a number using recursion and
explain its execution in detail.
• Program
• Recursion definition
Explanation with stack
110. Compare iterative algorithm and recursive definition with the following
examples: (i) Factorial (ii) Fibonacci sequence
(i) Factorial
• iterative algorithm with explanation
• recursive definition with explanation
(ii) Fibonacci sequence
• iterative algorithm with explanation
• recursive definition with explanation
115. What are circular lists? Explain how stacks and queues are represented
using circular list.
• Definition
• Advantage
• Linked implementation of stacks
•
• Linked implementation of queues
117. What are doubly linked lists? Explain the addition of long integers using
doubly linked lists.
• Definition
• Advantage
• Description of addition
• Algorithm
• Example