0% found this document useful (0 votes)
261 views5 pages

C C CC C C CCCCCCC

This document contains 20 multiple choice questions about data structures and algorithms. The questions cover topics like arrays, linked lists, trees, graphs, sorting algorithms, searching algorithms, recursion, and complexity analysis. The answers provided are: 1. c 2. a 3. a 4. d 5. b 6. d 7. a 8. a 9. b 10. c 11. d 12. c 13. a 14. c 15. c 16. d 17. b 18. b 19. b 20. b

Uploaded by

gaurav_great8690
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
261 views5 pages

C C CC C C CCCCCCC

This document contains 20 multiple choice questions about data structures and algorithms. The questions cover topics like arrays, linked lists, trees, graphs, sorting algorithms, searching algorithms, recursion, and complexity analysis. The answers provided are: 1. c 2. a 3. a 4. d 5. b 6. d 7. a 8. a 9. b 10. c 11. d 12. c 13. a 14. c 15. c 16. d 17. b 18. b 19. b 20. b

Uploaded by

gaurav_great8690
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

PS Exam

1. 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 adjecent 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
 

2. Binary search algorithm can not be applied to

a. sorted linked list


b. sorted binary trees
c. sorted linear array
d. pointer array
 

3. The situation when in a linked list START=NULL is

a. underflow
b. overflow
c. housefull
d. saturated
 

4. Which of the following is two way list?

a. grounded header list


b. circular header list
c. linked list with header and trailer nodes
d. none of above
 

5. When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal


would return

a. FAEKCDBHG
b. FAEKCDHGB
c. EAFKHDCBG
d. FEAKDCHBG
 
6. 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

7. The Average case occur in linear search algorithm


a. When Item is somewhere in the middle of the array
b. When Item is not in the array at all
c. When Item is the last element in the array
d. When Item is the last element in the array or is not there at all

8. The complexity of the average case of an algorithm is


a. Much more complicated to analyze than that of worst case
b. Much more simpler to analyze than that of worst case
c. Sometimes more complicated and some other times simpler than that of worst case
d. None or above

9. The complexity of Binary search algorithm is


a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)

10. The complexity of Bubble sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

11. The complexity of merge sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

 
12. The indirect change of the values of a variable in one module by another module is
called
a. internal change
b. inter-module change
c. side effect
d. side-module update

13. Arrays are best data structures


a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation

 
14. 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

15.    A binary tree whose every node has either zero or two children is called
a. Complete binary tree
b. Binary search tree
c.   Extended binary tree
d. None of above

16.    The depth of a complete binary tree is given by


a. Dn = n log2n
b. Dn = n log2n+1
c.   Dn = log2n
d. Dn = log2n+1

17. If every node u in G is adjacent to every other node v in G, A graph is said to be


a. isolated
b. complete
c.   finite
d. strongly connected

18.  An algorithm that calls itself directly or indirectly is known as


a. Sub algorithm
b. Recursion
c.   Polish notation
d. Traversal algorithm

19.  The in order traversal of tree will yield a sorted listing of elements of tree in
a. Binary trees
b. Binary search trees
c.   Heaps
d. None of above

20.  In a Heap tree


a. Values in a node is greater than every value in left sub tree and smaller than right sub tree
b. Values in a node is greater than every value in children of it
c.   Both of above conditions applies
d. None of above conditions applies

Answers
1. Which of the following statement is false?
c. pointers store the next data element of a list
 
2. Binary search algorithm can not be applied to
a. sorted linked list
 
3. The situation when in a linked list START=NULL is
a. underflow
 
4. Which of the following is two way list?
d. none of above
 
5. When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal
would return
b. FAEKCDHGB
 
6. The Worst case occur in linear search algorithm when
d. Item is the last element in the array or is not there at all
 
7. The Average case occur in linear search algorithm
a. When Item is somewhere in the middle of the array
 
8. 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
c. O(n2)
 
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. Arrays are best data structures
a. for relatively permanent collections of data
 
14. Each array declaration need not give, implicitly or explicitly, the information about
c. the first data from the set to be stored

15.    A binary tree whose every node has either zero or two children is called

c. Extended binary tree

16.    The depth of a complete binary tree is given by


d. Dn =  log2n + 1

17. If every node u in G is adjacent to every other node v in G, A graph is said to be


b. complete

18.  An algorithm that calls itself directly or indirectly is known as


b. Recursion

19.  The in order traversal of tree will yield a sorted listing of elements of tree in
b. Binary search trees

20.  In a Heap tree


b. Values in a node is greater than every value in children of it

You might also like