Documente Academic
Documente Profesional
Documente Cultură
Ans Option(a)
Option(b)
Option(c)
Option(d)
2k-1
2k
2k-1
2k+1
Internal
External
Stable
None of these
An ordered set of items from which items may be deleted at either end and into which items may be inserted at either 3 end is called d
Queue
Stack
Heap
Dequeue
tree whose left subtree has value less than tree whose Tree whose root and right and left right and left right subtree has subtree has subtree has value less value more value more than root than root than root
tree whose left subtree has value greater than root and right subtree has value more than root
an interger variable
allocate process resources by to schedule procedure the operating jobs on round- call in a system robin basis program binary search is binary search always is always better than binary search better than sequential is always sequential search when better than search when no of sequential no of element element is search is small large
Which of the following expressions accesses the (I,j)th entry of a m*n matrix stored in a column major 10 form? The following sequence of operation is 11 performed on a
m*(i-1)+j
m*(j-1)+i
m*(n-j)+i
m*(m-i)+j
2,2,1,2,1
2,2,1,1,2
2,1,2,2,1
2,1,2,2,2
The result of evauating prefix expression */b + d a c d where a=3 c 12 ,b=6 c=1 d=5 is
10
None of these
Write the output of the following program int a[]={1,2,3},*p; p=&a[0];printf("%d" 13 ,*(p+3)); b
junk value
runtime error
Insert an item
Remove the item having the largest (or Both(a) and smallest)key (b)
Counting Counting the the minimum average memory memory needed by needed by the the algorithm algorithm
Best case
Worst case
Average case
Null case
Item is somewhere in the Item is not middle of in the array the array at all
Item is the last Item is the element in last the array or element in is not there the array at all
When Item is somewhere When Item in the When Item is the last middle of is not in the element in the array array at all the array
When Item is the last element in the array or is not there at all
Sometimes more complicate Much more Much more d and some complicated simpler to other times to analyze analyze than simpler than that of that of worst than that of None or worst case case worst case above
The complexity of linear search 22 algorithm is a The complexity of Binary search 23 algorithm is b The complexity of Bubble sort c 24 algorithm is
O(n)
O(log n)
O(n2)
O(n log n)
O(n)
O(log n )
O(n2)
O(n log n)
O(n)
O(log n)
. O(n2)
O(n log n)
O(n)
O(log n)
O(n2)
O(n log n)
The indirect change of the values of a variable in one module by another module is 26 called c
internal change
intermodule change
Arrays
None of above
Trees
Graphs
Arrays
None of above
The operation of processing each element in the list 29 is known as d Finding the location of the element with a 30 given value is:
Sorting
Merging
Inserting
Traversal
Traversal
Search
Sort
None of above
for the size of the structure and the data in the structure are for both of for none of constantly above above changing situation situation
for the size of the structure and the data for relatively in the permanent structure are for both of collections constantly above of data changing situation
Each array declaration need not give, implicitly or explicitly, the 33 information about c
the first data from the data type the set to of array be stored
by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
the architecture of computer memory does not allow arrays to store other than both of serially above
none of above
insertion at insertion at the start of the end of the the sequence sequence.
1014
1012
1001
1002
There are 8, 13, 14, 15 different nodes in different binary trees. Which of them coud have formed a full binary 37 tree ? b
13
15
14
Of the following tree structure, which is, efficient considering space and time complexities (a) Incomplete Binary Tree (b) Complete Binary Tree 38 (c) Full Binary Tree b Consider the linear arrays aaa(5:50), bbb(-5:10) and ccc(18), then the number of elements in each array is 39 a
both b and c c
46, 16, 18
45, 15, 18
47, 45, 18
Suppose T contains the text 'THIS FATHER IS THE PROFESSOR', then the INDEX(T, 'THE'), INDEX(T, 'THEN') and INDEX(T, 'THE') 40 have the values c INSERT(T, K, S) can 41 be simulated as (A+B^D)/(E-F)+G can be written in the post fix 42 notation as
7, 0, 14
8, 1, 15
8, 0, 8
7, 0, 7
SUBSTRING(T SUBSTRING(T, SUBSTRING( SUBSTRING( , 1, KK, KT, 1, T, 1, K1)//S//SUBST 1)//S//SUBST K+1)//S//SU 1)//S//SUBS
None of these
Take A = 7.0, B = 4.0, C = 3.0 and D = 12.0, the values of Reverse Polish Notation expression 43 ABC + /D* is a
12.0
14.0
20.0
18.0
A variant of quick sort which attempts to choose a pivot likely to represent the middle of the values to be sorted a 44 is
P-Quick Sort
Pivot Sort
A technique for recursively processing the nodes of a tree in which subtrees are processed before 45 root is processed is a An array M is declared as Double M[2][4]; Array M b 46 has
Post-Order Traversal
Quick Traversal
Pre-Order Traversal
In-Order Traversal
6 elements
8 elements
12 elements 20 elements
If a binary search tree has an inorder traversal if 1, 2, 3, 4, 5, 6 and the root node contains 3 and 5 as the root of its right subtree, the order in which numbers were inserted in this tree a 47 is
3 , 5, 4, 6
3, 4, 6, 5
3, 6, 4, 5
3, 5, 6, 4
Prim's algorithm is a method available for finding out the minimum cost of a spanning tree. Its time complexity is 48 given as c The minimum height of a binary tree having 1000 49 nodes is
O (n)
O (n log n)
O (n * n)
O (log n)
100
10
11
101
The number of trees possible with 50 10 nodes would be d The height of a AVL tree with n nodes is 51 at most a
1000
1014
1001
none of these
log2 (N)
N log2 N
The linear representation method of implementing a binary tree uses a one-dimensional array of one of the following size where d is the depth of the binary 52 tree: a
d+1
-1
(1+d) -1
2 * log d
d+2
-1
1 NULL link
2 NULL Links
Worst case sort of Merge Sort and 54 Insertion sort are: a In a multi-way tree , each node can have more than ? 55 Children. b
m-1
m+1
2m
In Min-Heap, which 56 is true ? b what is true regarding the vertex of an Acyclic 57 graph ? c
All child All child have All child have have key key greater key greater less than than key of than equal to equal to key parent key of parent of parent Repeats a Vertex thus forming a cycle
If all nodes in a graph are connected to itself with edges of weight w, then the adjacency matrix of 59 the graph is b
is a upper traingular matrix with all non-zero is a matrix entries with all zero being w elements
Reference count may be maintained for memory locations used in a linked list for the 60 purpose of c In an AVL tree the heights of two subtrees of every node never differ by 61 more than b
reclamation
copying
traversal
compaction
Kruksals algorithm for building minimal cost spanning tree of a graph considers edges for inclusion in the tree in the ? 62 Order of the cost d
parallel
decreasing
same
increasing
Index is computed An auxiliary using hashing table is set and stored aside in within the addition to search file the file itself itself
An ordered forest is 64 one whose a A strict Binary tree with n leaves 65 contains
n2 nodes
2n+1 nodes
n2 - 1 nodes 2n - 1 nodes
base(item + base(item) + base(item) + base(item) + 1) + (i1 * m1 (i1 + m1 * i2 ) (i1 * m1 + i2 (i1 * m1 + i2 + i2 ) * esize * esize ) * esize ) + esize
Re-Hashing is done 68 to b Adjacency Multi-List 69 is used in c Two Dimensional Array of Arcs is also 70 known as c
Re-create a Hash when it has become inefficient Resolve Hash Re-Order a over time Clash Hash Adjacency Matrix Sparse Matrix
None of these
Radix Sort
Re-Hashing
Matrix
None of these
1. Two main measures for the efficiency of an algorithm are c. Time and space
2. The time factor when determining the efficiency of algorithm is measured by b. Counting the number of key operations 3. The space factor when determining the efficiency of algorithm is measured by a. Counting the maximum memory needed by the algorithm
4. Which of the following case does not exist in complexity theory d. Null case 5. The Worst case occur in linear search algorithm when d. Item is the last element in the array or is not there at all
6. The Average case occur in linear search algorithm a. When Item is somewhere in the middle of the array 7. The complexity of the average case of an algorithm is a. Much more complicated to analyze than that of worst case
9. The complexity of Binary search algorithm is b. O(log n) 10. The complexity of Bubble sort algorithm is 2 c. O(n ) 11. The complexity of merge sort algorithm is d. O(n log n)
12. The indirect change of the values of a variable in one module by another module is called c. side effect 13. Which of the following data structure is not linear data structure? d. None of above
14. Which of the following data structure is linear data structure? c. Arrays 15. The operation of processing each element in the list is known as d. Traversal 16. Finding the location of the element with a given value is: b. Search 17. Arrays are best data structures a. for relatively permanent collections of data
18. Linked lists are best suited b. for the size of the structure and the data in the structure are constantly changing
19. Each array declaration need not give, implicitly or explicitly, the information about c. the first data from the set to be stored 20. The elements of an array are stored successively in memory cells because
a. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated