July 17, 2021 in C and CPP
What is hashing?
a) What is hashing? Give the characteristics of hash function. Name different hash
functions.
July 17, 2021 in C and CPP
a) What is hashing? Give the characteristics of hash function. Name different hash
functions.
July 17, 2021 in C and CPP
b) Show the steps of sorting the following sequence.
25 57 48 37 12 92 86 33
in ascending order using quick sort method.
July 17, 2021 in C and CPP
a) Write the algorithm of sorting a set of numbers in descending order using Straight
selection sort. Analyze the algorithm.
July 17, 2021 in C and CPP
b) Write down the iterative algorithm for in-order traversal of a binary tree. What will be the performance analysis of the algorithm?
July 17, 2021 in C and CPP
a) What is a binary tree? Write down different properties of a binary tree.
July 17, 2021 in C and CPP
b) Suppose you are given 2 polynomials. Represent the polynomial in a suitable data structure and write an algorithm/ function to add 2 polynomials.
July 17, 2021 in C and CPP
a) What is a circular list? Write an algorithm for inserting a node at the front.
July 17, 2021 in C and CPP
b) Suppose you have an array of number denoted by num[ ]. Write the iterative and recursive
procedure to find the sum of 1000 elements. What is the space requirement in both the
cases?
July 17, 2021 in C and CPP
a) What do you mean by Performance analysis? What are the other criteria for judging
programs?
July 17, 2021 in C and CPP
A. Degree H. front=0, rear= n-1 O. n+1
B. n log n I. n P. Dangling pointer
C. 1 J. 2 Q. Maximum
D. n2 K. Call by reference R. Call by value
E. 3 L. Free space S. minimum
F. front= rear = 0 M. -1
G. level N. 2e
4.1 During initial creation of heap, root contains __________ element.
4.2 The number of sub-tree of a node is called its __________.
4.3 In hashing, collision and overflow occurs simultaneously when the bucket size is ______.
4.4 In a circular queue, initial condition given is __________.
4.5 If unsorted file contains n numbers line between 100–999, then the number of passes
required to sort the file using radix sort is ________.
4.6 Passing a structure to a function can be performed by _________.
4.7 Suppose in the following union definition
union
{
int a;
char b;
}item;
int requires 2 bytes and char requires 1 byte. Number of bytes allocated to item will be
______.
4.8 If p is a pointer and if free(p) is executed, p will create ______.
4.9 For a connected, undirected graph G with n vertices and e edges, the sum of degrees of
vertices is ______.
4.10Empty queue is represented by the queue in which rear = _____.