July 17, 2021 in C and CPP
What is a spanning tree? What do you mean by minimal spanning tree?
b) What is a spanning tree? What do you mean by minimal spanning tree?
July 17, 2021 in C and CPP
b) What is a spanning tree? What do you mean by minimal spanning tree?
July 17, 2021 in C and CPP
a) Write a “C” function to compute the in-degree and out-degree of a vertex of a directed graph when the graph is represented by an adjacency list.
July 17, 2021 in C and CPP
c) Write a recursive “C” function to implement binary search.
July 17, 2021 in C and CPP
b) Find the time complexity of the simple selection sort.
July 17, 2021 in C and CPP
a) Show with the help of an example that the simple selection sort is not data sensitive.
July 17, 2021 in C and CPP
b) Consider the following binary tree

Indicate the output in the following cases: -
i) When the tree is traversed in an “inorder” fashion.
ii) When the tree is traversed in an “preorder” fashion.
iii) When the tree is traversed in an “Postorder” fashion.
July 17, 2021 in C and CPP
a) Prove that the maximum number of nodes in a binary tree of height “k” is 2^k+1-1.
July 17, 2021 in C and CPP
b) A function A(m,n) is defined as follows.
A(m,n) = n + 1, if m = 0
= A ( m – 1, 1), if n = 0
= A(m – 1, A(m, n-1)), otherwise
write a recursive “C” function to compute A(m,n)
July 17, 2021 in C and CPP
a) Write a “C” function to implement the Knuth Mooris Pratt algorithm for string searching.
July 17, 2021 in C and CPP
b) Write an algorithm to evaluate Postfix expression with the help of a stack.