We define D-Tree(G) as the tree obtained by applying the DFS algorithm on a graph G. Consider the following statements regarding the same. S1 : If G is an undirected graph, then every edge in D-Tree(G) is either a tree edge or a back edge. S2 : If G is a undirected graph, then every edge in D-Tree(G) is either a tree edge, or a cross edge.
Which of the above statements are true?
A sorting technique is called stable if
What will be the complexity of the below program?
What is the basic idea behind Huffman coding ?
Consider the following message:
Message = pppqqqqqrpqppqqrrrrssssspq
The number of bits required for huffman encoding of the above message are __________?
Consider the following code.
Assume Node is a structure type with 3 members as follows:
If two binary tree root pointers are passed to the function f(), then which of the following statement is correct?
fn(int n, int p, int r)
static int a;
case 4 : a+=a* r;
case 3: a+=a*r;
case 2: a+=a*r;
case 1: a+=a*r
void main( )
fn(1, 1000, 12);
What is the output of above program ?
Consider the following C-programming run over given binary tree by passing root node as the parameter:
The final value return by count ( ) functions is ____.
What will be the output of the program?
Input/output function prototypes and macros are defined in which header file?
Consider the program.
int y = 1;
print f (“%d”, (*(char *) & x));
If the machine in which this program is executed in such a way that the lower significant digits occupy lower address, then the output will be _____.
Consider a stack S which is initially empty. Now the following operations are performed on stack : • Push(1) • Push(2) • Push(3) • Pop • Pop • Push(1) • Push(2) • Pop • Pop • Push(3) Now what is the position and element at top of stack ?
Queue follows which methodology for storing the data items.
What will be the prefix expression corresponding the given expression? a + b + c * d / e ^ f ^ g * h
Assuming the items are inserted in order sorted into an empty binary search tree T, then the depth of such a tree is