DSU PTT ds1 Paper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Q. Which of these best describes an array?

a) A data structure that shows a hierarchical behavior


b) Container of data elements of similar types
c) Container data elements of mixed types
d) All of the mentioned
Answer.b

Q. Which of the following data structure is not a Linear Data Structure?


a) Arrays
b) Linked lists
c) Both of these
d) None of these
Answer. d

Q. The operation of processing each element in the list is known as, _________.
a) Sorting
b) Merging
c) Inserting
d) Traversal
Answer . d

Q. Two main measures of the efficiency of an algorithm are


a) Processor and memory
b) Complexity and capacity
c) Time and space
d) Data and space
Answer .C

Q. Array implementation of Stack is not dynamic, which of the following statements supports
this argument?
a. space allocation for array is fixed and cannot be changed during run-time
b. user unable to give the input for stack operations
c. a runtime exception halts execution
d. improper program compilation
Answer:- a
Q What are the disadvantages of arrays?
a) We must know beforehand how many elements will be there in the array
b) There are chances of wastage of memory space if elements inserted in an array are lesser than
than the allocated size
c) Insertion and deletion becomes tedious
d) All of the above
Answer : .d

Q. Which of the following is the fastest sorting algorithm to sort a list?

a) Quick sort
b) Bubble sort
c) Binary sort
d) Linear sort
Answer .a

Q. Which of the following is not the required condition for binary search algorithm?
a) The list must be sorted
b) There should be the direct access to the middle element in any sublist
c) There must be mechanism to delete and/or insert elements in list
d) None of above
Answer .c

Q. O(n) means computing time is


a) Constant
b) Quadratic
c) Linear
d) Cubic
Answer : c

Q. Which of the following is useful in implementing quick sort?


a) Stack
b) Set
c) List
d) Queue
Answer : a
Q. The complexity of linear search algorithm is
a) O(n)
b) O(logn)
c) O(n2)
d) O(nlogn)
Answer : a

Q. Which of the following is not an application of binary search?


a) To find the lower/upper bound in an ordered sequence
b) Union of intervals
c) Debugging
d) To search in unordered list

Answer: d

Q. Pushing an element into stack already having five elements and stack size of 5, then stack
becomes
a) Overflow
b) Crash
c) Underflow
d) User flow
Answer : a

Q. Which of the following is not the application of stack?


a) A parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer
d) Data Transfer between two asynchronous process
Answer. d

Q. Which data structure is needed to convert infix notation to postfix notation?


a) Branch
b) Tree
c) Queue
d) Stack

Answer : d
Q. A linear list of elements in which deletion can be done from one end (front) and insertion can
take place only at the other end (rear) is known as a ?
a) Queue
b) Stack
c) Tree
d) Linked list
Answer : a

Q.Which of the following is true about linked list implementation of stack?


A. In push operation, if new nodes are inserted at the beginning of linked list, then in pop
operation, nodes must be removed from end.
B. In push operation, if new nodes are inserted at the end, then in pop operation, nodes
must be removed from the beginning.
C. Both of the above
D. None of the above
Ans : D

Q.Entries in a stack are "ordered". What is the meaning of this statement?


A. A collection of stacks is sortable
B. Stack entries may be compared with the '<' operation
C. The entries are stored in a linked list
D. There is a Sequential entry that is one by one
Answer. D

Q. Which case of data structure operation takes maximum time?


A. Worst Case
B. Average Case
C. Best Case
D. None of the above
Ans : A
Q.The smallest element of an array's index is called its
A. lower bound.
B. upper bound.
C. range.
D. extraction.
Ans : A

Q. 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
B. the architecture of computer memory does not allow arrays to store other than serially
C. both of above
D. none of above
Ans : A

Q. Which of the following case does not exist in complexity theory?


A. Best case
B. Worst case
C. Average case
D. Null case
Ans : D

Q. 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 last element in the array or is not there at all
Ans : D

Explanation:The Worst case occur in linear search algorithm when Item is the last element in the array or
is not there at all.

You might also like