## Data Structures and Algorithms

A ____________ is a well defined list for solving a particular problem.

A. algorithm.

B. complexity.

C. time.

D. space.

ANSWER: A

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

A. the name of array

B. the data type of array

C. the first data from the set to be stored

D. the index set of the array

ANSWER: C

The __________notation is used when the function f(n) is bounded both from above and below by the function g(n).

A. Omega

B. Little Oh

C. Oh

D. Theta

ANSWER: D

Which of the following is not a limitation of binary search algorithm

A. must use a sorted array

B. requirement of sorted array is expensive when a lot of insertion and deletions are needed

C. there must be a mechanism to access middle element directly

D. binary search algorithm is not efficient when the data elements more than 1500.

ANSWER: D

State True or False for internal sorting algorithms. i) Internal sorting are applied when the entire collection if data to be sorted is small enough that the sorting can take place within main memory. ii) The time required to read or write is considered to be significant in evaluating the performance of internal sorting.

A. i-True, ii-True

B. i-True, ii-False

C. i-False, ii-True

D. i-False, ii-False

ANSWER: B

The memory address of fifth element of an array can be calculated by the formula

A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array

B. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array

C. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array

D. None of above

ANSWER: A

In fixed- length storage, all records have same number of __________.

A. record.

B. address.

C. code.

D. field.

ANSWER: D

In variable length storage, two dollar signs are used to denote the __________.

A. end of the string.

B. beginning of the string.

C. mid-level of the string.

D. index.

ANSWER: A

In linked storage, linearly ordered sequence of memory cells is called as__________.

A. link.

B. nodes.

C. thread.

D. list.

ANSWER: B

The ________notation is used when the function g(n) defines a lower bound for the function f(n).

A. Omega

B. Theta

C. Little Oh

D. Big Oh

ANSWER: A

The ___________ notation defines an upper bound function g(n) for f(n)which represents the space/time complexity of the algorithm.

A. Big Oh

B. Little Oh

C. Omega

D. Theta

ANSWER: A

Arrays whose rows or columns begin with different numbers of data elements and end with unused storage locations are said to be ______.

A. multidimensional array

B. jagged array

C. row matrix

D. column matrix

ANSWER: B

In preorder traversal the root is processed ________.

A. first

B. second

C. third

D. randomly

ANSWER: A

Two main measures for the efficiency of an algorithm are ___________.

A. processor and memory.

B. complexity and capacity.

C. time and space.

D. data and space.

ANSWER: C

The time factor, when determining the efficiency of algorithm is measured by ____________.

A. counting microseconds.

B. counting the number of key operations.

C. counting the kilobytes of algorithm.

D. counting number of lines.

ANSWER: B

The space factor when determining the efficiency of algorithm is measured by __________.

A. counting the maximum memory needed by the algorithm.

B. counting the minimum memory needed by the algorithm.

C. counting the average memory needed by the algorithm.

D. counting the maximum disk space needed by the algorithm.

ANSWER: A

Which of the following case does not exist in complexity theory

A. Best case.

B. Worst case.

C. Average case.

D. Null case.

ANSWER: D

The Worst case occur in linear search algorithm when _____________.

A. item is somewhere in the middle of the array.

B. item is not in the array at all.

C. item is the last element in the array.

D. item is the first element in the array.

ANSWER: B

Processing each element in list is called as ____________.

A. Indexing.

B. Traversing.

C. Sorting.

D. Searching.

ANSWER: B

Finding the location of the element is called as______________.

A. traversing

B. searching.

C. concatenation.

D. indexing.

ANSWER: B

Combine two elements to a single list called as_______________.

A. merging.

B. traversing.

C. searching.

D. sorting.

ANSWER: A

Arranging elements in some type of order _______________.

A. merging.

B. traversing.

C. searching.

D. sorting.

ANSWER: D

A ________________ is a list of finite number and of homogeneous data elements.

A. linear array.

B. sequential array.

C. selection array.

D. pointer.

ANSWER:A

The free node linked list is also called as ________.

A. free pool.

B. empty pool.

C. unavailable list.

D. inaccessible list

ANSWER: A

25. ______________ is a collection of related data items.

A. Record.

B. Attribute.

C. Field.

D. Identifiers.

ANSWER: A

The user defined names given to various data items are called as_____________.

A. record.

B. attributes.

C. field.

D. identifiers.

ANSWER: D

______________ is a collection of similar records.

A. Records.

B. File.

C. Field.

D. Identifiers.

ANSWER: B

A record may be collection of ______________ data.

A. homogeneous.

B. non-homogeneous.

C. sequential.

D. indexed.

ANSWER: B

Array elements are referenced by__________.

A. position.

B. pointer.

C. index set.

D. number.

ANSWER: C

Let the address of an array element be A[K],then K is called as the_________.

A. subscript.

B. subscripted variable.

C. bound.

D. index variable.

ANSWER: A

What will be the output of the following arithmetic expression 5+3*2%10-8*6

A. -37.

B. -42.

C. -32.

D. -28.

ANSWER: A

An m x n array has _________number of elements.

A. m.

B. n.

C. m2.

D. m x n.

ANSWER: D

The sequence (1,1.,(2,1.,(3,1.,(1,2.,(2,2.,(3,2.,….represents _________.

A. row major order.

B. column major order.

C. random order.

D. successive order.

ANSWER: B

Base address is the address of __________.

A. last element.

B. first element.

C. middle element.

D. pivot element.

ANSWER: B

Pointers stores ______of an element.

A. value.

B. address.

C. operation.

D. data.

ANSWER: B

Records can be represented using _______ in memory.

A. strings.

B. two dimensional arrays.

C. linear arrays.

D. parallel arrays.

ANSWER: D

A BST is traversed in the following order recursively: Right, root, left The output sequence will be in

A. Ascending order

B. Descending order

C. Bitomic sequence

D. No specific order

ANSWER: B

The first step of development of an algorithm is______.

A. Problem analysis.

B. Problem statement.

C. Algorithm analysis.

D. Implementation.

ANSWER: A

Separating group items from sub items is called________.

A. separation.

B. quantification.

C. qualification.

D. purification.

ANSWER: C

A linked list has __________ parts in each node.

A. two.

B. three.

C. four.

D. five.

ANSWER: A

The pointer of last node contains __________.

A. list pointer.

B. next pointer.

C. start.

D. null pointer.

ANSWER: D

Collection of deleted space onto free-pool is ________.

A. collection.

B. storage.

C. garbage collection.

D. tagging.

ANSWER: C

The situation that arises when trying to insert an item in linked list when free pool is empty is called _________.

A. underflow.

B. empty.

C. null.

D. overflow.

ANSWER: D

________ is the situation where linked list is empty and trying to delete an item.

A. Overflow.

B. Underflow.

C. Null.

D. Empty.

ANSWER: B

Which of the following is true while inserting a new node in the list

A. Check there is node in the list.

B. Check there is node in the free pool.

C. Check node in the list and free pool.

D. All the above.

ANSWER: B

Which of the following is true, while deleting a node from the list

A. Check if there is node in the list.

B. Check in the free pool.

C. Check node in the list and free pool.

D. All the above.

ANSWER: A

.Header linked list contains header node at the _________ of the list.

A. end B. beginning

C. middle

D. second position

ANSWER: B

___________is the header list where last node contains null pointer.

A. circular header.

B. 2 way list.

C. linked list.

C. start.

D. null pointer.

ANSWER: D

Collection of deleted space onto free-pool is ________.

A. collection.

B. storage.

C. garbage collection.

D. tagging.

ANSWER: C

The situation that arises when trying to insert an item in linked list when free pool is empty is called _________.

A. underflow.

B. empty. C. null.

D. overflow.

ANSWER: D

________ is the situation where linked list is empty and trying to delete an item.

A. Overflow.

B. Underflow.

C. Null. D. Empty.

ANSWER: B

Which of the following is true while inserting a new node in the list

A. Check there is node in the list.

B. Check there is node in the free pool.

C. Check node in the list and free pool. D. All the above.

ANSWER: B

Which of the following is true, while deleting a node from the list

A. Check if there is node in the list.

B. Check in the free pool.

C. Check node in the list and free pool. D. All the above.

ANSWER: A

Header linked list contains header node at the _________ of the list.

A. end

B. beginning

C. middle

D. second position

ANSWER: B

___________is the header list where last node contains null pointer.

A. circular header.

B. 2 way list.

C. linked list.

D. grounded header list.

ANSWER: D

________ is the header list where last node points back to header node.

A. circular.

B. grounded.

C. linked.

D. 2-way.

ANSWER: A

The list which can be traversed forward & backward is ___________ list.

A. circular

B. header

C. 2-way

D. grounded

ANSWER: C

_________ is an operation to add a new value.

A. Traversing.

B. Inserting.

C. Searching.

D. Looking.

ANSWER: B

Which of the following data structure can’t store the non-homogeneous data elements

A. Arrays.

B. Records.

C. Structure.

D. All of the above.

ANSWER: A

Which of the following is the best way to represent matrices

A. linear arrays.

B. two dimensional arrays.

C. pointers.

D. structure.

ANSWER: B

In bubble sort algorithm, the condition flag=0 indicates that _________.

A. the list is not sorted.

B. there are no items in the list.

C. the items are interchanged.

D. the list is already sorted

ANSWER: D

Which of the following is true regarding the difference between linear array and a record?(I). An array is suitable for homogeneous data but the data items in a record may have different data type. (II). In a record, there may not be a natural ordering in opposed to linear array. (III). A record form a hierarchical structure but a linear array does not.

A. Only I is true.

B. Only II is true

C. II and III are true.

D. I,II and III are true.

ANSWER: D

Which of the following statement is false

A. Arrays are dense lists and static data structure.

B. Data elements in linked list need not be stored in adjacent space in memory.

C. Pointers store the next data element of a list.

D. Linked lists are collection of the nodes that contain information part and next pointer.

ANSWER: C

Binary search algorithm can not be applied to ____________.

A. sorted linked list.

B. sorted binary trees.

C. sorted linear array.

D. pointer array.

ANSWER: A

LINK [START]=NULL in the grounded linked list indicates that the __________. A. list is full

B. list is empty

C. list cannot store items

D. no space to insert items

ANSWER: B

START=NULL should be true for ____________ to occur

A. underflow.

B. overflow.

C. houseful.

D. saturated.

ANSWER: A

Which of the following is two way lists

A. Grounded header list

B. Circular header list

C. Linked list with header, left pointer and right pointer nodes

D. Singly linked list.

ANSWER: C

Which of the following name does relate to stack

A. FIFO lists.

B. LIFO list.

C. Files.

D. Circular list

ANSWER: B

A __________ is a list of elements in which an element may be inserted or deleted at only one end.

A. deque.

B. queue.

C. stack.

D. recursion.

ANSWER: A

_________________ is the term used to delete an element from a stack.

A. Push.

B. Pop.

C. Queue.

D. Priority queue.

ANSWER: B

When the operator symbol placed before two operands, then the notation is called ______________.

A. reverse polish.

B. postfix.

C. polish.

D. Prefix.

ANSWER: D

A _____________ is a list of elements in which elements are inserted at one end and deletion at the other end.

A. deque.

B. queue.

C. stack

D. recursion.

ANSWER: B

Queue is also called as __________.

A. FIFO.

B. LIFO.

C. SIRO.

D. RISO.

ANSWER: A

Which one of the following sequence can obtain the output using stack assuming that the input is 1,2,3,4,5

A. 3,4,5,1,2. B. 3,4,5,2,1.

C. 1,5,2,3,4.

D. 5,4,3,2,1.

ANSWER: D

A collection of elements in which the element has been assigned a priority___________.

A. priority queue.

B. stack.

C. deque.

D. queue.

ANSWER: A

FIFO is the short form of ___________. A. First In First Out.

B. First In Final Out.

C. Final In First Out.

D. Final In Final Out.

ANSWER: A

The term deque is a contraction of the name________.

A. double ended queue.

B. single ended queue.

C. double queue.

D. single queue.

ANSWER: A

In executing the procedure PUSH, one must first test whether there is room in the stack for the stack new item; if not then we have the condition known as_________.

A. underflow.

B. overflow.

C. pop.

D. none.

ANSWER: B

A_________ operation into STACK is accomplished by inserting a node into the front or start of the list.

A. POOP.

B. PUSH.

C. START.

D. none.

ANSWER: B

A pointer variable ___________ contains the location of the top element of the stack.

A. MAXSTX.

B. TOP.

C. null.

D. BOTTOM.

ANSWER: B

The ________field of the nodes hold the data elements of the stack.

A. INFO.

B. LINK.

C. stack.

D. queues.

ANSWER: A

In executing the procedure POP ,one must test whether there is an element in the stack to be deleted, if not then the condition is known as___________.

A. stack.

B. recursion.

C. overflow.

D. underflow.

ANSWER: D

A _________operation is undertaken by deleting the node pointed to by the START pointer in stack. A. MAXSTK.

B. POP.

C. LINK.

D. INFO.

ANSWER: B

The condition TOP=0 indicates ___________.

A. stack is empty.

B. stack is full.

C. stack is unavailable.

D. stack overflows.

ANSWER: A

Recursion can be implemented by the use of ___________ data structure.

A. stack.

B. queues.

C. link.

D. pointer.

ANSWER: A

The ______ is not a sorting algorithm.

A. quick sort.

B. binary search.

C. bubble sort.

D. heap sort.

ANSWER: B

Linear search is also called as __________.

A. consecutive search.

B. reverse search

C. sequential search.

D. binary search.

ANSWER: C

The address of the first and last element of each sub list called as_________.

A. push values.

B. pop values.

C. boundary values.

D. pointer.

ANSWER: C

Deletion in a queue occurs at _________ end.

A. front.

B. rear.

C. top.

D. both.

ANSWER: A

Insertion in queue takes place at the ________ end.

A. front.

B. rear.

C. push.

D. pop.

ANSWER: B

The __________ function is a function with two arguments each of which can be assigned any non negative integer.

A. Linear

B. Polynomial

C. Well defined

D. Ackermann

ANSWER: D

The length Li in a multidimensional arrays is calculated by using the formula ______.

A. Li =upper bound – lower bound + 1.

B. Li = upper bound + lower bound – 1

C. Li = upper bound – lower bound – 1.

D. Li = upper bound – lower bound.

ANSWER: A

In a circular queue the value of r will be ___________.

A. r=r+1

B. r=(r+1)% [QUEUE_SIZE -1]

C. r=(r+1)% QUEUE_SIZE

D. r=(r-1)% QUEUE_SIZE

ANSWER: A

What will be the value of top, if there is a size of stack STACK_SIZE is 5

A. 5

B. 6

C. 4

D. none

ANSWER: A

The initial configuration of the queue is a,b,c,d (a is the front end). To get the configuration d,c,b,a one needs a minimum of

A. 2 deletions and 3 additions

B. 3 additions and 2 deletions

C. 3 deletions and 3 additions

D. 3 deletions and 4 additions

ANSWER: C

Identify the data structure which allows deletions at both ends of the list but insertion at only one end.

A. input-restricted deque.

B. output-restricted deque.

C. priority queues.

D. none of above.

ANSWER: A

The number of possible ordered trees with three nodes A,B,C is

A. 11

B. 12

C. 13

D. 14

ANSWER: B

The __________ function is a function with two arguments each of which can be assigned any non negative integer.

A. Linear

B. Polynomial

C. Well defined

D. Ackermann

ANSWER: D

The length Li in a multidimensional arrays is calculated by using the formula ______.

A. Li =upper bound – lower bound + 1.

B. Li = upper bound + lower bound – 1

C. Li = upper bound – lower bound – 1.

D. Li = upper bound – lower bound. ANSWER: A

In a circular queue the value of r will be ___________.

A. r=r+1

B. r=(r+1)% [QUEUE_SIZE -1]

C. r=(r+1)% QUEUE_SIZE

D. r=(r-1)% QUEUE_SIZE

ANSWER: A

Which of the following data structure is linear type

A. Tree.

B. Forest.

C. Queues.

D. None of the above.

ANSWER: C

Which data structure is suitable for representing hierarchical relationship between the elements

A. Dequeue.

B. Linked lists.

C. Tree.

D. Array.

ANSWER: A

An expression is a collection of ___________.

A. operands.

B. operators.

C. symbols.

D. operands and operators.

ANSWER: D

A binary tree T is defined as a finite set of elements called________.

A. nodes.

B. arrays.

C. stacks.

D. terminal.

ANSWER: A

The nodes with no successor are called as________.

A. successive nodes.

B. terminal node.

C. sub tree.

D. child.

ANSWER: B

The number of binary trees with 3 nodes which when traversed in postorder given the sequence A,B,C is ____________.

A. 3.

B. 9.

C. 7.

D. 5.A

NSWER: D

A terminal node in a tree is called as _________.

A. leaf.

B. branch.

C. node.

D. root.

ANSWER: A

98. The path ending in a leaf of a tree is called as___________.

A. branch.

B. node.

C. pointer.

D. root.

ANSWER: A

Any invalid address is denoted by _____________.

A. null.

B. pointer.

C. avail.

D. memory.

ANSWER: A

Matrices with a relatively high proportion of zero entries are called __________.

A. sparse matrices.

B. diagonal matrices.

C. triangular matrices.

D. zero order matrices.

ANSWER: A

Special pointers in a binary tree are called as_________.

A. threads.

B. tags.

C. nodes.

D. headers.

ANSWER: A

An elegant sorting algorithm that uses heap is called _________.

A. heap.

B. heap sort.

C. max heap.

D. quick sort.A

NSWER: B

The second matrix, where nonzero entries can only occur on the diagonal or on elements immediately above or below the diagonal is called a _________.

A. sparse matrix.

B. triangular matrix.

C. tridiagonal matrix.

D. zero-order matrix.

ANSWER: C

Tower of Hanoi is an example application for ___________.

A. stack.

B. queue.

C. recursion.

D. linear list.

ANSWER: C

___________data structures combine the advantages of the sorted array and the linked list.

A. Sorted .

B. Linked tree.

C. Binary search tree.

D. Tree.

ANSWER: C

106. When the operator symbol is placed between its two operands the notation is called ________.

A. infix.

B. postfix.

C. prefix.

D. inter operator.

ANSWER: A

If s1 is left successor of node N and s2 is the right successor of node N then, N is _______of s1 and s2.

A. child.

B. grandchild.

C. parent.

D. descendant.

ANSWER: C

How many standard ways are there to traverse a binary tree

A. one.

B. two.

C. three.

D. four.

ANSWER: C

The tree T is said to be ________ if all its levels, except possibly the last, have the maximum number of possible nodes, and if all the nodes at the last level appear as far left as possible.

A. weighted tree.

B. complete.

C. extended.

D. B-tree.

ANSWER: B

List of adjacency nodes, are also called as _________.

A. successors.

B. boundary.

C. edges.

D. root.

ANSWER: A

The root is processed before its subtrees in _______ traversal.

A. inorder.

B. preorder.

C. postorder.

D. all of the above.

ANSWER: B

The average running time f(n) to search an item in a binary tree T with n elements is ______.

A. O(n2).

B. O(log2n).

C. O(n).

D. O(n3).

ANSWER: B

The following sequence of operation is performed on stack : push(1),push(2),pop,push(1),push(2),pop,pop,pop,push(2),pop. The sequence of popped out values are

A. 2,2,1,1,2

B. 2,2,1,2,2

C. 2,1,2,2,1

D. 2,1,2,2,2

ANSWER: A

Tree is a ___________ structure.

A. linear.

B. non-linear.

C. circular.

D. pointer.

ANSWER: B

The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is

A. 11

B. 12

C. 13

D. 14

ANSWER: D

116. Binary trees with special pointers namely threads are called ____________.

A. linked trees.

B. pointing trees.

C. extended trees.

D. threaded trees.

ANSWER: D

A tree T is called __________ , if each node N in T satisfies – the value at N is greater than every value in the left subtree of N and is less than the value in the right subtree of N.

A. binary search tree.

B. extended tree.

C. B-tree.

D. rooted tree.

ANSWER: A

__________ is the level number of the root node.

A. 1.

B. 0.

C. -1.

D. 5.A

NSWER: B

119. _______is the technique that is used to restore the balance of the search tree.

A. Rotations.

B. Resolutions.

C. Revolutions.

D. Recursions.

ANSWER: A

Which of the following data structure is used in retrieval and manipulation of data stored in external memory

A. Binary search.

B. Quick sort.

C. m-way search trees.

D. Heap sort.

ANSWER: C

The ___________ pointer of header node points the root node.

A. left.

B. right.

C. null.

D. node.

ANSWER: A

The pointer which replaces null entries pointing to higher nodes are ___________.

A. next.

B. full.

C. high.

D. threads.

ANSWER: D

The complexity of linear search algorithm is __________.

A. O(n).

B. O(log n).

C. O(n2).

D. O(n log n).

ANSWER: A

The complexity of Binary search algorithm is ____________.

A. O(n).

B. O(log2n).

C. O(n2).

D. O(n log n).

ANSWER: B

The complexity of Bubble sort algorithm is _____________.

A. O(n).

B. O(log n).

C. O(n2).

D. O(n log n).

ANSWER: C

The complexity of merge sort algorithm is_____________.

A. O(n).

B. O(log n).

C. O(n2).

D. O(n log n).

ANSWER: D

Which of the following linked list does not have any NULL links

A. Single linked list.

B. Linear doubly linked list.

C. Circular linked list.

D. Two way linked list.

ANSWER: C

If yyy, xxx and zzz are the elements of a lexically ordered binary tree, then in preorder traversal which node will be traverse first

A. xxx.

B. yyy.

C. zzz.

D. cannot be determined.

ANSWER: A

In a balance binary tree the height of two sub trees of every node can not differ by more than __________.

A. 2.

B. 1.

C. 0.

D. 3.A

NSWER: B

130. The result of evaluating prefix expression */b+-dacd, where a = 3, b = 6, c = 1, d= 5 is __________.

A. 0.

B. 5.

C. 10.

D. 15.

ANSWER: C

In an array representation of binary tree the right child of root will be placed at the _______ location.

A. second.

B. fifth.

C. third.

D. first.

ANSWER: C

The dummy header in linked list contains _________.

A. first record of the actual data.

B. last record of the actual data.

C. pointer to the last record of the actual data.

D. all the above.

ANSWER: A

In which of the following algorithm, the smallest element is found first and placed in the first position,

then the next smallest in the second place, and so on

A. Merge sort.

B. Selection sort.

C. Insertions sort.

D. Radix sort.

ANSWER: B

Given two sorted lists of size m and n respectively.The number of comparisons needed in the worst case by the merge sort algorithm will be _______.

A. mn.

B. max(m,n).

C. min(m,n).

D. m+n-1.

ANSWER: D

Very slow way of sorting is _______________.

A. insertion sort.

B. heap sort.

C. bubble sort.

D. quick sort.

ANSWER: A

Sorting a file F usually refers to sorting F with respect to a particular key called _____________.

A. basic key.

B. primary key.

C. starting key.

D. index key.

ANSWER: B

Selection sort first finds the _________________ element in the list and put it in the first position.

A. middle element.

B. largest element.

C. last element.

D. smallest element.

ANSWER: D

The operation that combines the element is of A and B in a single sorted list C is called _______________.

A. inserting.

B. mixing.

C. merging.

D. sharing.

ANSWER: C

__________________ sorting is good to use when alphabetizing large list of names.

A. Merge.

B. Heap.

C. Radix.

D. Bubble.

ANSWER: C

Which of the following sorting algorithm is of divide-and-conquer type

A. Bubble Sort.

B. Insertion Sort.

C. Quick Sort.

D. Merge Sort.

ANSWER: C

____________ is the complexity of the merge sort algorithm for both worst and average case.

A. O(n log n).

B. O(n log+n).

C. O(n+log n).

D. O(log n).

ANSWER: A

____________ algorithm is frequently used when the total number of elements is small.

A. Heap sort.

B. Insertion sort.

C. Bubble sort.

D. Quick sort.

ANSWER: B

To represent hierarchical relationship between elements, which data structure is suitable

A. Deque

B. Tree

C. Stack

D. all the above

ANSWER: B

One can convert a binary tree into its mirror image by traversing it in__________.

A. inorder.

B. preorder.

C. postorder.

D. any order.

ANSWER: C

The best average behaviour is shown by______

A. Quick Sort

B. Merge Sort

C. Insertion Sort

D. Heap Sort

ANSWER: A

If the node N is a terminal node in a binary tree then its ______

A. right and left tree is empty.

B. left tree is empty and right tree is full.

C. right tree is empty and left tree is full.

D. right and left tree is full.

ANSWER: A

If the address of A[1][1] and A[2][1] are 1000 and 1010 respectively occupies 2 bytes then the array has been stored in _________ order.

A. row major

B. column major

C. matix major

D. none of these

ANSWER: A

An algorithm is made up of two independent time complexities in the order ______________.

A. f(n) x g(n).

B. Max ( f(n),g(n)).

C. Min (f(n),g(n)).

D. f(n) + g(n).

ANSWER: B

Which of the following condition shows that stack is full

A. TOP=NULL. .

B. TOP=MAX.

C. TOP=MAX+1.

D. POP=MAX-1

ANSWER: B

The elements are removed from a stack in _______ order.

A. hierarchical.

B. inorder.

C. reverse.

D. alternate.

ANSWER: C