July 17, 2021 in C and CPP
Write the structure of a node for linked implementation of a polynomial
a) Write the structure of a node for linked implementation of a polynomial. Write a function in ‘C’ to create a linked list for a polynomial.
July 17, 2021 in C and CPP
a) Write the structure of a node for linked implementation of a polynomial. Write a function in ‘C’ to create a linked list for a polynomial.
July 17, 2021 in C and CPP
c) Construct an AVL tree with the following key arriving in the given order:
k, t, v, a, e,
July 17, 2021 in C and CPP
b) Can we represent a general tree as a binary tree? If yes, give an example otherwise justify your answers.
July 17, 2021 in C and CPP
a) Define a binary tree. What do you mean by tree traversal? Give the different traversal
algorithms.
July 17, 2021 in C and CPP
c) Give array implementation of stack and queue.
July 17, 2021 in C and CPP
b) Illustrate with the help of an example how an arithmetic expression can be evaluated by using a stack.
July 17, 2021 in C and CPP
a) Write the different operations that can be done in a stack of elements of type T as well as in a queue of elements of type T.
July 17, 2021 in C and CPP
A. Ordered set B. Folding C. Insertion
D. Linked list E. n + 2 * e F. n + e
G. array H. 2 * n I. 10
J. BFS K. FIFO L. 12
M. 32 N. One-to-many O. Many-to-many
P. Doubly-linked list Q. 0 R. Abstract data type
4.1 A graph represents ________ relationship between nodes.
4.2 ________ data structure is used to implement dynamic storage management.
4.3 If x=2.5, y=0.1, m=1, n=-1. The value of the expression x > y && m < n is ________.
4.4 A B-tree of order 24 contains at least ________ keys in non-root node.
4.5 ________ can be used to find the shortest distance between given two nodes in a graph.
4.6 Given int r = 10;
Int *q = &r;
The value of *q is ________.
4.7 The ________ data structure uses direct access method for retrieval of the data.
4.8 Total number of nodes required to represent an undirected graph with “n” nodes and “e” edges using adjacency list representation is ________.
4.9 List is a(n) ________ of elements.
4.10 Linked list is preferred over an array for ________ operation.
July 17, 2021 in C and CPP
Each statement below is either TRUE or FALSE. Choose the most appropriate one and
ENTER in the “tear-off” sheet attached to the question paper, following instructions
therein.
2.1 Heap sort is more efficient for small size of file.
2.2 The space requirement for the quick sort method depends on the number of nested recursive calls or the size of the stack.
2.3 One of the major drawbacks of the B-Tree is the difficulty of traversing the keys sequentially.
2.4 Breadth-first search algorithm can only be used for undirected graph.
2.5 Any general tree can be converted to a binary tree.
2.6 The method of interpreting a bit pattern is called a data type.
2.7 “Linear probing” as a collection resolution technique in hashing usually leads to clustering of data.
2.8 ‘Insertion in’ and ‘deletion from’ an array does not involve physical movement of elements of the arrays.
2.9 It is advantageous to implement a stack using a doubly connected linked list instead of using a singly connected linked list.
2.10 Insertion of a new element in a priority queue always occurs at the rear of the queue,
irrespective of its priority.
July 17, 2021 in C and CPP
1.10 A complete binary tree with 10 leaves
A) cannot have more than 19 nodes
B) has exactly19 nodes
C) has exactly 17 nodes
D) cannot have more than 17 nodes