Anda di halaman 1dari 8

Question Bank

Paper Code: MCA 102 Subject: Data & File Structure


1 | P a g e

Questions with weightage of 2 Marks Each

1. What is the difference between null array and empty array?
2. Why always array start with index 0?
3. What is a null Macro?
4. Differentiate between static and dynamic list?
5. What is the difference between null and void pointers?
6. What do you mean by complete graph?
7. What is a CONST pointer?
8. What is sorting? How is sorting essential with data base applications?
9. What is the difference between FIFO and LIFO?
10. Explain the working of Tree Sort?
11. Differentiate between Tree and Graph?
12. What is the static list? How is it implemented?
13. Explain Big O notations.
14. Compare B+ and B* trees.
15. Explain graph coloring technique and give its applications.
16. Give best case and worst case analysis for quick sort and merge sort.
17. Explain hashed file organization.
18. Give an example to illustrate polynomial arithmetic expression using linked list.
19. Give applications of stacks and queues.
20. Give representations of threaded binary tree.
21. Give analysis of Dijkstra algorithm.
22. Compare prims and kruskal Spanning tree algorithm.
23. Differentiate between the terms variable and parameter.
24. Determine the length and number of substring of string THREAD.
A* (B + C) * D/E .
25. Find the number of elements in the array A (1:8, -5:5, -10:5). Which will be the first
and the last element of this array.
26. When is a link list better than arrays.
27. Why infix expressions are converted into postfix expressions.
28. Circular Queues is better than linear queues. Justify the statement.
29. A given binary search tree is to be sorted. Which traversal method should be
applied?
30. Why searching is easier in sorted list.
31. Discuss any one hash function.
32. What is a B-tree?
33. Define B-Tree
34. Convert following infix expression into prefix and postfix \
A* (B + C) * D/E
35. Give the difference between external and internal sorting. Give names of some
external sorting techniques.
36. Define stack and give some application s of stacks.
37. How many nodes are there on level I of a binary tree? Prove the answer.
38. Define transitive closure of a graph.
39. Define inverted files.
40. Describe adjacency list representation of graph with the help of an example.
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
2 | P a g e

41. Give two examples of Hash function.
42. Give difference between complete and full binary tree.
43. Give an example for AVL tree

Questions With weigthage of more than 2 marks

1. Write a program to implement stack operation push and pop with pointer. (5)
2. Convert infix expression to its equivalent postfix expression
(x+y-z) / (h+k) - z ? (5)
3. Write a program to implement queue containing eight elements and perform the
insertion and deletion operation. (5)
4. Convert the following prefix expression into postfix expression
//*+ABCDE. (5)
5. Write a function that returns the height of an AVL tree. (5)
6. Show the result of inserting 3, 1, 4, 6, 9, 2, 5, 7 into an initially empty binary search
tree. (5)
7. Write an algorithm that takes only a pointer to the root of a binary tree T and
computes the number of nodes in T. (5)
8. Show that the maximum number of nodes in a binary tree of height H is 2H+1-1. (5)
9. Sort the sequence 4, 8, 11, 6, 2, 1, 15, 26, 3 using insertion sort. What is the running
of insertion sort if all keys are equal? (5)
10. Show how Heap sort processes the input- 85, 500, 300, 250, 186, 225, 175. (5)
11. Write an algorithm to find Maximum Cost Spanning tree. Is this harder than finding
the Minimum Cost Spanning tree? (5)
12. Explain the following types of file organization techniques:- (6)
a. Sequential file organization
b. Indexed sequential file organization
c. Direct file organization
13. Difference between K way polyphase merges. (4)
14. Differentiate between sequential file access, random file access and Direct file access
and write advantages and disadvantages of one another. Write the situation when
which kind of file would be best be used. (6)
15. What is console I/O and define its types? (4)
16. Convert the folloing infix expression to its equivalent prefix and postfix expression:
(A B)/((D+E)*F) (4)
17. Wite an algorithm to delete an element from double linkes list (6)
a. At beginning of list.
b. At end of list.
c. After a node P.
18. Write algorithm to implement muplication of two polynomial P1 and P2 (4)
19. Compare queues and deques. (3)
20. Define and give examples for any two of the following : (3)
a. Sparse Matrix.
b. Row major order expression.
c. Column major order expression.
21. Write Kruskals algorithm and give its analysis. (5)
22. Compare Dijkastras and Floyd Warshalls algorithm. (3)
23. Consider the following undirected graph G
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
3 | P a g e


Using Prims algorithm, generate minimum spanning tree for the above graph. Give
sequence of steps also. (4)
24. Give an example to illustrate graph coloring and its applications. (3)
25. Give an example to illustrate topological sort. (3)
26. Mention any two techniques for each of the following: (4)
a. Internal Sorting Technique.
b. External Sorting Technique.
27. Compare the following with a suitable example: (6)
a. Kway merge sort
b. Balanced merge sort.
c. Polyphase merge sort.
28. Compare the following: (6)
a. Radix Sort
b. Shell Sort.
c. Selection Sort.
29. Consider the list: (4)
50, 40, 20, 60, 80, 35, 90, 45
Sort the given list using quick sort. Give sequence of steps also.
30. Explain the following file organization technique: (6)
a. Random Organization.
b. Inverted Organization.
c. Cellular Partition Organization
31. Compare tree indexing and hashed indexing techniques. (4)
32. Mention any three file queries. (2)
33. Explain linked file organization and trie indexing technique. (5)
34. Explain cylinder surface indexing. (3)

Questions With weightage of 10 Marks each)

1. Given a linear sorted array having N elements and that it can store MAX elements. Write
an algorithm to insert the contents of ITEM into it.
2. Consider a linked list defined by START. It has a node with address P. Write an
algorithm to split it into two link lists one starting with START and second has P as into
first node.
3. The element of a binary tree. Have to be stored in an array. Write the desired algorithm.
The output should also indicate number of elements in the tree.

Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
4 | P a g e


4. Find the path matrix using WARSHALL algorithm for the graph G.

5. Given list of numbers arranged in the form of linear array 44, 33, 11, 51, 77,90, 99,
22. Using quick sort algorithm find the element of the array when 44 is set it
position. Also discuss the status of STACK.
6. Given the sorted list in the form of linear arrays having N and M elements.
7. Write an algorithm to MERGE these lists into a single sorted list. The name of the
elements these are repeated is to be enumerated.
8. What is file organization? Why it is needed. Discuss in detail sequential file
organization with its MERITS and DEMERITS.
9. Write an algorithm to convert a given infix expression into an equivalent portfolio
expression. Illustrate the working of the algorithm on the following infix expression.
((8*7) + 4) * (7+9)/6-10
10. Describe any two of the following algorithms:
a. Kruskals Algorithm
b. Shell Sort
c. Polyphone Merge sort
11. How polynomial are represented using linked list. Write program for addition of two
polynomials represented using linked list.
12. Explain with the help of algorithm how infix expression converted to postfix
expression using stack.
13. Write Prims algorithm for finding minimum cost spanning tree. Show its working
on a graph.
14. Explain how trees can used for representation of disjoint sets. Explain Union of find
operations on these sets.
15. Explain Merge sort algorithm and show its working on following members
4, 10, 2, 6, 8, 12, 5, 7
16. What is hashing? What are various types of Hash functions? What are various
methods of collision resolution?
17. What do you mean by file organization? Explain various file organization techniques.
18. Write short notes on the following Index techniques
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
5 | P a g e

a. Cylinder surface indexing
b. Hashed Indexes
c. Tree indexing.

Other Questions weightage mentioned on right hand side.

1. What is difference between Big-O and Small-O notation. Define them. 4
2. Give an example of algorithm that has following complexity (in terms of Big-O).
(i) O (1) (ii) O(N) (iii) O (N2) (iv) O (n log n)
3. Algorithm 1 does a particular task in time N3 where N is no. of elements processed.
Algorithm 2 does same task in time 3N + 1000. 4
a. What are Big-O requirement of each algorithm.
b. Under what conditions, if any, would the less efficient algorithm executes
more quickly than more efficient algorithm?
4. Write a procedure to print elements of a singly linked list in reverse order while
traversing it only once. 6
5. Let a queue be implemented as a circular linked structure with an external pointer
accessing the rear element: 6
a. Draw a sketch of such a queue with one node.
b. Write a algorithm for insertion and deletion.
6. Write an algorithm to implement selection sort. 7
7. Sort the following numbers (Showing each iteration) using Quick Sort :- 57, 73, 43,
77, 83, 63, 87.
8. Write a algorithm to convert infix expression to postfix expression using stack. Also,
write an algorithm to evaluate postfix expression. 12
9. Define sparse matrix. Implement sparse matrix as an array. Give an algorithm to
transpose a sparse matrix for this implementation. 12
10. What do you mean by file organization? Differentiate between sequential, hashed
and random file organization. 6
11. What is aim of hashing? What are different hashing techniques? What are the
problems encountered in them and how to overcome them. 6
12. Write a algorithm for topological sort of a graph. 7
13. Taking an example of a graph. Show how breadth first search operates on this graph.
5
14. Write short notes on any three of the following :- 3 x 4
a. Balanced Merge sort
b. Critical path
c. B+ tree
d. B-tree
15. Explain why there might be tradeoffs between saving computer (Execution) time
and saving programming time. 3
16. Explain the difference between sequential array based representation and linked
representation of a list with examples. 4
17. Explain the difference between internal and external sorting with example. 3
18. Define Big-O notation. 2
19. Write a procedure in C/C++ to add two single variable polynomial using linked list. 7
20. Write an algorithm that implement insertion and deletion operation on circular
queue. 5
21. Formulate an algorithm to implement insertion sort. 6
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
6 | P a g e

22. Derive time complexities for insertion sort, quick sort, and selection sort. 6
23. Define B-Tree. What is the difference B-Tree and B+ -Tree. 5
24. Construct an AVL tree in which element are inserted in following order : 72, 44, 100,
200, 30, 57, 10 5
25. What is difference between tree, binary tree and a graph? 2
26. Write a non-recursive algorithm for preorder traversal of a tree. Give example also.
12
27. Write an algorithm to implement breadth first search for a graph. 6
28. Taking an example of graph, show how depth first search operates on the graph. 12
29. What is sparse matrix? Implement sparse matrix as an array. Give an algorithm to
add and subtract two sparse matrices for this implementation. 6
30. Write short notes on any three of the following :- 12
a. Polyphase mergesort.
b. Search Tree
c. Inverted Tree
d. Hashing
31. Write a routine, which reads the matrix, If non-zero elements are less than 25% of
total elements, it converts this matrix to SPARSE matrix representation. 7
32. What is advantage of circular queues over queues? Write add & delete routine for it.
7
33. Differentiate between tree and binary tree. 4\
34. Write a module for insertion of node t as right child of s in threaded binary tree.
Clearly explain its working using a suitable binary tree. 10
35. Write a routine for traversal of singly linked list without using any additional node. 9
36. What do you mean by dynamic memory allocation? In which cases, it is used. 5
37. Write PUSH & POP routines for linked stack. 6
38. How do you determine run-time of algorithms? Give an example of O (n log n). 5
39. Define generalized lists. 3
40. Assume that we have a sorted array of elements in descending order. Can binary
search algorithm still be implemented on it? If yes, write the modified algorithm. If
not, justify why not? 7
41. If a list is already sorted in descending order, how fast will be insertion sort for
ascending? Clearly explain. 7
42. For an undirected graph G with n vertices & e edges, show that 6

43. By considering the complete graph with n vertices, show that no. of spanning trees is
at least 2n-1 1. 8
44. Write an algorithm to insert a new key value X into a tree in which the keys are
sampled from left to right, one character at a time. 7
45. Define and explain inverted files. 7
46. How overflow is handled in hashing. 10
47. Define and explain cellular partitioning. 4
48. What do you mean by data structure? Explain with the help of two examples. 3
49. What do you mean by complexity of an algorithm? Explain with an example.3
50. Define a Binary Search tree. Draw the expression tree for the following:
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
7 | P a g e

x : = (a<b) or (e < f) 3
51. Determine the order in which the vertices of following binary tree will be visited in
post order traversal. 3


52. Write a function in C that will count the number of nodes in linked binary tree. 5
53. Convert following INFIX expression to POSTFIX expression 2
A+ (B*C) * (D + E) * F
54. Give the average case and worst case complexity for the following algorithm 4
(i) Selection Sort (ii) Quick Sort
55. Define AVL tree. Convert the following into an AVL tree. 4

56. Describe briefly sequential file organization with an example. 3
57. What is the difference between internal and external sort. 2
58. Write a function in C to delete a node, different from first and last node, from a
linked list. 4
59. Give the node structure of a binary search tree. Using it write a recursive function to
traverse a tree in preorder. 4
60. Give the array implementation of the stack. Write function for pushing and poping
elements from a stack. 10
61. Draw a binary search tree when the keys arrive in the given order. 10
p, x, b, e, a, c, f, y, q, r
Delete the nodes containing the keys in the following order
a, e, x
62. Describe the heap sort method for sorting the following list 10
15, 16, 13, 19, 5, 7, 4, 18
Show the result of the intermediate steps also.
63. For the following digraph 7
Question Bank
Paper Code: MCA 102 Subject: Data & File Structure
8 | P a g e


Obtain the transitive closure. Give the steps for finding the transitive closure.
64. Write a recurrence relation for obtaining nth terms of the Fibonacci series. 3
65. Write a program in C to implement depth-first traversal of a graph. 10
66. Define a B-tree. Draw a B-tree of order 5 when the keys arrive in the following order.
a, f, g, b, h, d, j, m, s, e, r, i, e, x, n, l, u, t, p
and then delete the keys in the reverse order of arrival. 10
67. Give the array implementation of a circular queue. Write functions in C to insert and
delete an element from circular queue. 10

Anda mungkin juga menyukai