Sie sind auf Seite 1von 18

Question Maximum no of nodes in a binary 1 tree of depth K

Ans Option(a)

Option(b)

Option(c)

Option(d)

2k-1

2k

2k-1

2k+1

If the records to be sorted are in b 2 auxiliary storage

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

The property of hash function is 4 that

it minmizes the rate of overflow

it preserves the order of key values

it minimizes it minimizes number of rate of collisions underflow

Binary search tree is c 5a

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

Aforest is obtained c 6 from a tree when

its children a subtree is are removed removed

root of the tree is removed

root of the tree is added

In an 16 bit computer,30 digit integer can be 7 stored in

an interger variable

floating point none of variable a circular list these

A stack can be used 8 to c

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

none of the above

Which of the following 9 statements are true c

binary search very inferior to sequential search

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

address of third element

A priority queue is a data structure with 14 operation(s) as c

Insert an item

Remove the item having the largest (or Both(a) and smallest)key (b)

Remove the item having the priority key

Two main measures for the efficiency of an 15 algorithm are

Processor and memory

Complexity Time and and capacity space

Data and space

The time factor when determining the efficiency of algorithm is b 16 measured by

counting the Counting number of microsecon key ds operations

Counting the number of statements

Counting the kilobytes of algorithm

The space factor when determining the efficiency of algorithm is 17 measured by a

Counting the maximum memory needed by the algorithm

Counting Counting the the minimum average memory memory needed by needed by the the algorithm algorithm

Counting the maximum disk space needed by the algorithm

Which of the following case does not exist in 18 complexity theory d

Best case

Worst case

Average case

Null case

The Worst case occur in linear search algorithm 19 when

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

The Average case occur in linear search 20 algorithm

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

The complexity of the average case 21 of an algorithm is a

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)

The complexity of merge sort 25 algorithm is d

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

sidemodule side effect update

Which of the following data structure is not linear data 27 structure?

Arrays

Both of . Linked lists above

None of above

Which of the following data structure is linear 28 data structure? c

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

Arrays are best 31 data structures

for relatively permanent collections of data

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

Linked lists are 32 best suited

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

for none of above situation

Each array declaration need not give, implicitly or explicitly, the 33 information about c

the name of array

the first data from the data type the set to of array be stored

the index set of the array

The elements of an array are stored successively in memory cells 34 because

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

The deque and list classes are both 35 optimized for: d

insertion at insertion at the start of the end of the the sequence sequence.

insertion in the middle of a sequence

insertion at either end of a sequence.

How many different trees are possible 36 with 10 nodes a

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

46, 46, undefined

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

++/A^+/+A^BD-EFG ++/A^BD-EFG BDEFG

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

Balanced Quick Sort

P-Quick Sort

Optional 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)

log2 (2 * N+1) log2 (N+2)

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

53 The circular List has b

1 NULL link

at least 1 No NULL Link 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

O (n log n), N N * (N-1)/2, O O (n log n), * (N-1)/2 (n log n) O (n log n)

O (log n), O (n2)

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

All child have key equal to key of parent

Repeats more than one vertex Open addressing method

Repeats No Has no vertex vertex Uniform Address method

Uniform Hashing 58 technique uses

Closed Unique Hash addressing method method

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 matrix with all 1's

is a diagonal matrix with value w for diagonal elements

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

Which is true for an indexed search 63 method ? a

Index is computed An auxiliary using hashing table is set and stored aside in within the addition to search file the file itself itself

The index is maintained in a separate indexed file

The index is stored on separate storage media for fast retrieval

An ordered forest is 64 one whose a A strict Binary tree with n leaves 65 contains

component trees are ordered

component trees are unordered

O(f) = Sum O(t)

O(f) = Sum O(t+1)

n2 nodes

2n+1 nodes

n2 - 1 nodes 2n - 1 nodes

For a Row Major array type the address of 66 item[i1][i2] will be

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

A B-Tree of order 24 contains at least ? Keys in a non-root 67 node c

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

Adjacency Sparse Matrix 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

8. The complexity of linear search algorithm is a. O(n)

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

Das könnte Ihnen auch gefallen