End-Term Examination Second Semester [MCA] MAY-JUNE 2006

Size: px
Start display at page:

Download "End-Term Examination Second Semester [MCA] MAY-JUNE 2006"

Transcription

1 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] MAY-JUNE 2006 Subject: Data Structure Time: 3 Hours Maximum Marks: 60 Note: Question 1. is compulsory and is of 20 marks. Attempt one out of two questions from remaining four units. All questions in units are of 10 marks each. Q. 1 (a) Differentiate between the terms variable and parameter. (b) Determine the length and number of substring of string THREAD. A* (B + C) * D/E. (c) 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 (d) When is a link list better than arrays. (e) Why infix expressions are converted into postfix expressions. (f) Circular Queues is better than linear queues. Justify the statement. (g) A given binary search tree is to be sorted. Which traversal method should be applied? (h) Why searching is easier in sorted list. (i) Discuss any one hash function. (j) What is a B-tree? Q. 2 (a) 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. (b) 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. Q. 3 (a) The element of a binary tree. A B C D E F G Have to be stored in an array. Write the desired algorithm. Te output should also indicate number of elements in the tree.

2 (b) Find the path matrix using WARSHALL algorithm for the graph G. G A B G D C Q. 4 (a) 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. (b) Given the sorted list in the form of linear arrays having N and M elements. Write an algorithm to MERGE these lists into a single sorted list. The name of the elements these are repeated is to be enumerated. Q. 5 (a) What is file organization? Why it is needed. Discuss in detail sequential file organization with its MERITS and DEMERITS. UNIT III Q. 6 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 Q. 7 Describe any two of the following algorithms: (a) Kruskal s Algorithm (b) Shell Sort (c) Polyphone Merge sort

3 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] MAY 2005 Time: 3 Hours Maximum Marks: 60 Q. 1 (a) Define B-Tree (b) Convert following infix expression into prefix and postfix A* (B + C) * D/E. (c) Give the difference between external and internal sorting. Give names of some external sorting techniques. (d) Define stack and give some application s of stacks. (e) How many nodes are there on level I of a binary tree? Prove the answer. (f) Define transitive closure of a graph. (g) Define inverted files. (h) Describe adjacency list representation of graph with the help of an example. (i) Give two examples of Hash function. (j) Give difference between complete and full binary tree. UNIT - I Subject: Data Structure Note: Question 1. is compulsory and is of 20 marks. Attempt one out of two questions from remaining four units. All questions in units are of 10 marks each. Q. 2 How polynomial are represented using linked list. Write program for addition of two polynomials represented using linked list. Q. 3 Explain with the help of algorithm how infix expression converted to postfix expression using stack. UNIT - II Q. 4 Write Prim s algorithm for finding minimum cost spanning tree. Show its working on a graph. Q. 5 Explain how trees can used for representation of disjoint sets. Explain Union of find operations on these sets. UNIT - III Q. 6 Explain Merge sort algorithm and show its working on following members 4, 10, 2, 6, 8, 12, 5, 7

4 Q. 7 What is hashing? What are various types of Hash functions? What are various methods of collision resolution? UNIT - IV Q. 8 What do you mean by file organization? Explain various file organization techniques. Q. 9 Write short notes on any two of the following Index techniques (d) Cylinder surface indexing (e) Hashed Indexes (f) Tree indexing

5 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] MAY 2004 Time: 3 Hours Maximum Marks: 60 Note: Attempt any five questions. Subject: Data Structure Q. 1 (a) What is difference between Big-O and Small-O notation. Define them. 4 (b) Give an example of algorithm that has following complexity (in terms of Big-O). 4 (i) O (1) (ii) O(N) (iii) O (N 2 ) (iv) O (n log n) (c) Algorithm 1 does a particular task in time N 3 where N is no. of elements processed. Algorithm 2 does same task in time 3N (i) What are Big-O requirement of each algorithm. (ii) Under what conditions, if any, would the less efficient algorithm executes more quickly than more efficient algorithm? Q. 2 (a) Write a procedure to print elements of a singly linked list in reverse order while traversing it only once. 6 (b) Let a queue be implemented as a circular linked structure with an external pointer accessing the rear element: 6 (i) Draw a sketch of such a queue with one node. (ii) Write a algorithm for insertion and deletion. Q. 3 (a) Write an algorithm to implement selection sort. 7 (b) Sort the following numbers (Showing each iteration) using 5 Quick Sort :- 57, 73, 43, 77, 83, 63, 87. Q. 4 Write a algorithm to convert infix expression to postfix expression using stack. Also, write an algorithm to evaluate postfix expression. 12 Q. 5 Define sparse matrix. Implement sparse matrix as an array. Give an algorithm to transpose a sparse matrix for this implementation. 12 Q. 6 (a) What do you mean by file organization? Differentiate between sequential, hashed and random file organization. 6 (b) What is aim of hashing? What are different hashing techniques? What are the problems encountered in them and how to overcome them. 6

6 Q. 7 (a) Write a algorithm for topological sort of a graph. 7 (b) Taking an example of a graph. Show how breadth first search operates on this graph. 5 Q. 8 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

7 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] MAY 2003 Time: 3 Hours Maximum Marks: 60 Note: Attempt any five questions. Subject: Data Structures Q. 1 (a) Explain why there might be tradeoffs between saving computer (Execution) time and saving programming time. 3 (b) Explain the difference between sequential array based representation and linked representation of a list with examples. 4 (c) Explain the difference between internal and external sorting with example. 3 (d) Define Big-O notation. 2 Q. 2 (a) Write a procedure in C/C++ to add two single variable polynomial using linked list. 7 (b) Write an algorithm that implement insertion and deletion operation on circular queue. 5 Q. 3 (a) Formulate an algorithm to implement insertion sort. 6 (b) Derive time complexities for insertion sort, quick sort, and selection sort. 6 Q. 4 (a) Define B-Tree. What is the difference B-Tree and B + -Tree. 5 (b) Construct an AVL tree in which element are inserted in following order : 72, 44, 100, 200, 30, 57, 10 5 (c) What is difference between tree, binary tree and a graph? 2 Q. 5 Write a non-recursive algorithm for preorder traversal of a tree. Give example also. 12 Q. 6 (a) Write an algorithm to implement breadth first search for a graph. 6 (b) Taking an example of graph, show how depth first search operates on the graph. 12 Q. 7 What is sparse matrix? Implement sparse matrix as an array. Give an algorithm to add and subtract two sparse matrices for this implementation. 6 Q. 8 Write short notes on any three of the following :- 12 (a) Polyphase mergesort. (b) Search Tree (c) Inverted Tree (d) Hashing

8 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] JUNE 2001 Time: 3 Hours Maximum Marks: 70 Note: Attempt any five questions. Subject: Data Structures Q. 1 (a) 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 (b) What is advantage of circular queues over queues? Write add & delete routine for it. 7 Q. 2 (a) Differentiate between tree and binary tree. 4 (b) 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 Q. 3 (a) Write a routine for traversal of singly linked list without using any additional node. 9 (b) What do you mean by dynamic memory allocation? In which cases, it is used. 5 Q. 4 (a) Write PUSH & POP routines for linked stack. 6 (b) How do you determine run-time of algorithms? Give an example of O (n log n). 5 (c) Define generalized lists. 3 Q. 5 (a) 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 (b) If a list is already sorted in descending order, how fast will be insertion sort for ascending? Clearly explain. 7 Q. 6 (a) For an undirected graph G with n vertices & e edges, show that 6 n d 1 = 2 e where d 1 = degree of vertex i. i =1 (b ) By considering the complete graph with n vertices, show that no. of spanning trees is atleast 2 n

9 Q. 7 (a) 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 (b) Define and explain inverted files. 7 Q. 8 (a) How overflow is handled in hashing. 10 (b) Define and explain cellular partitioning

10 (Please write your Roll No. immediately) Roll No. Paper Code: MCA-102 End-Term Examination Second Semester [MCA] AUGUST 2000 Subject: Data Structure Time: 3 Hours Maximum Marks: 70 Note: Attempt four questions in all, including Q. No. 1, which is compulsory. Q. 1 (a) What do you mean by data structure? Explain with the help of two examples. 3 (b) What do you mean by complexity of an algorithm? Explain with an example.3 (c) Define a Binary Search tree. Draw the expression tree for the following: x : = (a<b) or (e < f) 3 (d) Determine the order in which the vertices of following binary tree will be visited in post order traversal (e) Write a function in C that will count the number of nodes in linked binary tree. 5 (f) Convert following INFIX expression to POSTFIX expression A+ (B*C) * (D + E) * F 2 (g) Give the average case and worst case complexity for the following algorithm (i) Selection Sort (ii) Quick Sort 4 (h) Define AVL tree. Convert the following into an AVL tree. 4 7 (i) 1 (ii)

11 (i) Describe briefly sequential file organization with an example. 3 (j) What is the difference between internal and external sort. 2 (k) Write a function in C to delete a node, different from first and last node, from a linked list. 4 (l) Give the node structure of a binary search tree. Using it write a recursive function to traverse a tree in preorder. 4 Q. 2 Give the array implementation of the stack. Write function for pushing and poping elements from a stack. 10 Q. 3 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 Q. 4 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. Q. 5 (a) For the following digraph Obtain the transitive closure. Give the steps for finding the transitive closure. (b) Write a recurrence relation for obtaining n th terms of the Fibonacci series. 3 Q. 6 Write a program in C to implement depth-first traversal of a graph. 10 Q. 7 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 Q. 8 Give the array implementation of a circular queue. Write functions in C to insert and delete an element from circular queue

12 END TERM EXAMINATION Second sem[mca] MAY-2008 Q1. (a) What is subscripted variable, why it is needed? (b) Difference between TRAVERSING, SEARCHING AND SORTING. (c) How local variable differ from GLOBAL VARIABLES. (d) Determine minimum number of bits required to store a character in the memory of the computer assuming the programming language require atleast 48 characters. (e) Explain the formula required to determine the address of the element of n subscripts. (f) For searching operation which is better ARRAY OR LINKED LIST. (g) Define DEQUEUES. What is their need? (h) What is the advantage of INORDER THREADING IN TREES? (i) Why Data files are needed? (j) Draw an undirected graph with 5 nodes and 7 edges. (2x10=20) Q2. (a) Input a two dimensional array of order mxn. Write an algorithm which should output this array and another two dimensional array (m+1)x(n+1), in which the elements of (m+1) row should be the sum of elements of m rows of (n+1) column should be the sum of n columns. (b) Translate the infix expression Ax(B+C)/D-Ex(F+G/H-K) into Postfix expression in showing the position of stack after each operation. (10) OR (a) Consider a sorted list defined by FIRST. Write an algorithm to insert the Content of ITEM in it. (b) Given the function:- A(m,n) = n+1 if m=0 = A(m-1,1) if m 0 but n 0 = A(m-1,A(m,n-1)) m 0,n 0 Obtain the value of A(1,3) showing each steps. (10)

13 Q3. (a) E denotes the following algebric expression [a+(b-c)]x[(d-e)/(f+g-h)] Draw Binary tree. Change it in to prefix expression using TRAVERSAL method. (b) Define Adjoint Matrix. Obtain the matrix A for the graph. Also compute A 2. (10) OR (a) Given a binary search tree. Write an algorithm to add the contents of ITEM. (b) Define Path Matrix. Obtain the path matrix for the above graph. (10) Q4. (a) Describe the algorithm of Bubble Sort. Trace it using following Numbers 25, 57, 48, 37, 12. (b) Define HASHING. Find the digit hash address of each number 9614, 2885, 3176, 9044, 5281 using method with m=79. (10) OR (a) Using the algorithm of QUICKSORT determine the position of P in PLEASURE showing the contents after each iteration. (b) Given a sorted of n elements. Show by taking an example of at least six elements that BINARY SEARCH is better than Linear search. (10) Q5. Mention different types of file organization. Explain in details RANDOM File organization. (10) OR What is indexing? What are its different ways? Explain in details TREE indexing. (10)

14

15 (Please write your Exam Roll No.) Exam Roll No. END TERM EXAMINATION SECOND SEMESTER (MCA) MAY-JUNE 2009 Paper Code: MCA-102 Subject: Data Structures Paper Id: (Batch: ) Time : 3 Hours Note: Q. is compulsory. Intenal choice is indicated. Q1. Answer any ten from the following: Maximum Marks:60 (2x10=20) (a) (b) Give examples of time-space tradeoff. How would you create generic data structures (capable of holding data of any type) in C? (c) (d) (e) (f) (g) (h) (i) What are Priority Queues? What are their applications? What is the time complexity of insert and delete operations in a linked queue if pointer to the head of the queue is maintained. Give an example situation where a duoublestack can utilized more efficiently than two separate stacks. Which traversal order would you prefer to clone a BST? Why? Demonstrate insert operation in an AVL tree for the key values: 10, 20, 30, 5 and 7? What are decision trees? Where are they used? What is Transitive Closure of a graph? How would you generate it?

16 (j) A list is ordered from smaller to largest when a sort is called. Which sorting algorithm would take the shortest time to execute? Justify. (k) (l) (m) (n) (o) Name an O(n) sorting algorithm with its drawback? Describe any two hash functions. What limitations are added to external sort algorithms when the data is stored on tape drives? How many disk accesses are required in direct addressing mode of random file organization if the records have variable length? Justify. Name a file organization technique that supports batch Operations and range queries efficiently. Justify your choice. UNIT-I Q2. (a) Write a C program that converts a sparse matrix (less than 25% populated) to a linked list of its non-zero entries, ensuring that the original data can be retrieved back from this linked storage. (5) (b) Evaluate and compare the average case time complexity Of Binary Search and Linear Search algorithms. (5) OR Q3. (a) Write a C function to merge two sorted linked lists into new sorted list. (5) (b) (c) Give any three applications of stacks and queues each in System Programming. (3) List advantages and disadvantages of arrays over linked lists. (2)

17 Q4. (a) Write a C function to insert a node in a threaded BST. (5) (b) What is topological sorting of a graph? Show the working of the topological sorting algorithm (clearly stating the output after each pass) for the graph whose adjacency matrix is given below: (5) Q5. (a) Write a C program to delete a node from binary search Tree. (5) (b) Show the working of Prim's algorithm on the following Graph: (5) UNIT-III Q6. (a) Demonstrate the working of Shell Sort Algorithm on the Following list taking 5, 3, 1 as increment values: (5) 22, 7, 5, 1, 10, 9, 20, 12, 35, 16, 11, 8, 3, 25, 6

18 (b) Explain the working of balanced K-way merge sort using 2K and K+1 tapes. Explain the advantages and disadvantages of the two approaches. (5) OR Q7. (a) Explain various collision resolution techniques, while hashing a set of keys clearly stating their advantages and disadvantages. (5) (b) (c) Demonstrate the working of polyphase merge sort with three tapes, give that initial number of sorted run is 55. (4) How would polyphase mergesort proceed if the initial number of runs is not a Fibonacci number? (1) UNIT-IV Q8. (a) Explain Cylinder surface indexing and the mechanism used for searching a record using this indexing technique. (5) (b) (c) Explain the usage of cellular partitions for organizing file storage. How can this technique be used for improving efficiency of read write operations? (4) While searching a key, how is number of disk accesses related to the order of a tree in tree based indexes? (1) OR Q9. (a) Explain inverted file organization, how is it different from regular files and indexes? List its advantages and disadvantages. (4) (b) Explain tree based indexing using m-way trees. (6) **********

19 END TERM EXAMINATION SECOND SEMESTER [MCA] MAY 2010 Paper Code: MCA 106 Paper ID: Subject : Computer System Architecture Time : 3 Hours Maximum Marks : 60 Note: Question 1 is compulsory. Attempt one question from each unit. Q1. Explain in brief: (6*2=12) a) Explain Big O notations. (2) b) Compare B+ and B* trees. (2) c) Explain graph coloring technique and give its applications. (2) d) Give best case and worst case analysis for quick sort and merge sort. (2) e) Explain hashed file organization. (2) f) Give an example to illustrate polynomial arithmetic expression using linked list. (2) g) Give applications of stacks and queues. (2) h) Give representations of threaded binary tree. (2) i) Give analysis of Dijkstra algorithm. (2) j) Compare prims and kruskal Spanning tree algorithm (2) UNIT-I Q2 a) Convert the folloing infix expression to its equivalent prefix and postfix expression: (A B)/((D+E)*F) (4) b) Wite an algorithm to delete an element from double linkes list (6) i. At beginning of list. ii. At end of list. iii. After a node P. Q3 a) Write algorithm to implement muplication of two polynomial P1 and P2 (4) b) Compare queues and deques. c) Define and give examples for any two of the following : i. Sparse Matrix. ii. Row major order expression. iii. Column major order expression. UNIT-II Q4. a) Give an example for AVL tree (2)

20 b) Write Kruskal s algorithm and give its analysis. (5) c) Compare Dijkastra s and Floyd Warshall s algorithm. (3) Q5 a) Consider the following undirected graph G V1 4 v v5 9 2 v V6 6 v7 Using Prim s algorithm, generate minimum spanning tree for the above graph. Give sequence of steps also. (4) b) Give an example to illustrate graph coloring and its applications. (3) c) Give an example to illustrate topological sort. (3) UNIT-III Q6 a) Mention any tow techniques for each of the following: (4) i. Internal Sorting Technique. ii. Extrnal Sorting Technique. b) Compare the following with a suitable example: (6) i.k way merge sort ii. Balanced merge sort. iii. Polyphase merge sort.

21 Q7. a) Compare the following: (6) i. Radix Sort ii. iii. Shell Sort. Selection Sort. b) Consider the list: (4) 50, 40, 20, 60, 80, 35, 90, 45 Sort the given list using quick sort. Give sequence of steps also. UNIT-IV Q8. a) Explain the following file organization technique: (6) i. Random Organization. ii. iii. Inverted Organization. Cellular Partition Organization b) Compare tree indexing and hashed indexing techniques. (4) Q9. a) Mention any three file queries. (2) b) Explain linked file organization and trie indexing technique. (5) c) Explain cylinder surface indexing. (3)

22 END TERM EXAMINATION SECOND SEMESTER [MCA] MAY-2011 Paper Code: MCA102 Subject: Data &File Structure Q1 (a) What do we mean by time and space complexity of an algorithm? (b) Compare the stack and queue data structure. (c) Compare B + and B* trees. (d) Let G be a simple connected graph with n vertices and m edges. Explain any O(log m) is O(log n). (e) What is the best case analysis of Merge sort and shell sort? (f) Give any two uses of tree data structure. (g) How do we retrieve date from sequential file? (h) What is a hash function? Why it is used? (i)define a critical path in the graph. (j) What is topological sorting? UNIT-I Q2 (a) Convert the following infix expression to its equivalent prefix and postfix expression (A+B)/((D-E) *F). (b) Consider the following queue of characters, implemented array of six memory locations. Front=2, Rear=3, queue=_,a,d,_,_,_ where _ denote empty memory cell. Describe the queue as The following operations takes place:- (i)add S (ii)add f (iii) delete two letters (iv)shift towards left to bring all free space to the right side. Q3 (a) A binary tree T has 3 nodes. The inorder and preorder traversals of yield the following sequence of nodes:- Inorder E A C K F H D B G

23 Preorder F A E K C D H G B (b) A certain professor among us claims that a preorder traversal of a heap will lest out its keys in a Sorted order. Draw a small example of a heap that proves him wrong. UNIT-II Q4 (a) Differentiate between the shortest path problem and the minimal spanning tree problem through an example. (b) Explain Warshall s algorithm taking an example of your choice. Q5 Draw a simple, connected weighted graph with 8 vertices and 16 edges each with unique edge Weights identify one vertex as a start vertex and illustrate a running of Dijkastra s algorithm on this Graph. UNIT-III Q6 (a) Sort the following list of numbers. Elaborating the steps of selection sort 95,43,51,7,1,46. (b)consider the following undirected graph G. a b 7 2 e 6 8 c 4 3 d f 9 g Generate minimum spanning tree for the above graph using Kruskal s algorithm. Q7 (a) Explain sequential file organization. What are the advantages and disadvantages of this kind of Organization? (b) What do you understand by topological sort

24 UNIT-IV Q8) (a) Differentiate between double buffering and block buffering. (b) What are various error control techniques? Explain their uses. Q9 Explain the following:- (a) Multistacks and multiqueues (b) Big O notation (c) Activity Network (d) Coloring of graph (e) Merging files k way

25 (Please write your Exam Roll No.) Exam Roll No.... Paper Code: MCA 102 END TERM EXAMINATION SECOND SEMESTER [MCA] MAY-JUNE 2012 Subject: Data & File Structure Time : 3 Hours Maximum Marks :60 Note: Part-I is compulsory. Attempt one question from rest of the parts. PART-I Q1 Attempt any ten questions of the following :- (2*10=20) a) What is the difference between null array and empty array? b) Why always array start with index 0? c) What is a null Macro? d) Differentiate between static and dynamic list? e) What is the difference between null and void pointers? f) What do you mean by complete graph? g) What is a CONST pointer? h) What is sorting? How is sorting essential with data base applications? i) What is the difference between FIFO and LIFO? j) Explain the working of Tree Sort? k) Differentiate between Tree and Graph? l) What is the static list? How is it implemented? PART-II Q2 (a) Write a program to implement stack operation push and pop with pointer. (5) (b) Convert infix expression to its equivalent postfix expression (x+y-z) / (h+k) - z? (5) Q3 (a) Write a program to implement queue containing eight elements and perform the insertion and deletion operation. (5) (b) Convert the following prefix expression into postfix expression //*+ABCDE. (5) PART-III Q4 (a) Write a function that returns the height of an AVL tree. (5) (b) Show the result of inserting 3, 1, 4, 6, 9, 2, 5, 7 into an initially empty binary search tree. Q5 (a) 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) (5) (b) Show that the maximum number of nodes in a binary tree of height H is 2 H+1-1. (5)

26 PART-IV Q6 (a)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) (b) Show how Heap sort processes the input- 85, 500, 300, 250, 186, 225, 175. (5) Q7 (a) Write an algorithm to find Maximum Cost Spanning tree. Is this harder than finding the Minimum Cost Spanning tree? (5) PART-V Q8 (a) Explain the following types of file organization techniques:- (6) (i) Sequential file organization (ii) Indexed sequential file organization (iii) Direct file organization (b) Difference between K way polyphase merges. (4) Q9 (a) 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) (b) What is console I/O and define its types? (4) **********

27 (Please write your Exam Roll No.) Exam Roll No.... END TERM EXAMINATION SECOND SEMESTER [MCA] MAY- JUNE 2013 Paper Code: MCA 102 Subject: Data & File Structures (New) Time: 3 Hours Maximum Marks: 60 Note: Attempt five questions including Q. No. 1 which is compulsory. Select one question from each unit. Q1 Attempt any ten of the following briefly: [2x10] a) Which operation works faster with a linked list as compared to an array? Why? b) When does Queue Underflow Exceptional Condition arise and how can it be avoided? c) Name a linear data structure that allows insertion and deletion on only one end. Also state its two uses. d) In an expression tree, what is evaluated first, the leaf nodes or the internal nodes? e) Give definition for the struct Stack that can be used for non-recursive in-order traversal of a tree. f) What is the worst case time complexity of searching a node in a BST? Draw a sample tree that leads to this case. g) State and explain an advantage of a B+ tree over a B tree. h) Which data structure would you use for DFS traversal of a graph? What about BFS? i) Which internal sorting algorithm would you use in case the input is almost sorted? Why? j) What is critical path in a graph? What is its significance? k) What is the average time complexity of insert operation and search operation in a Hash table? l) Which sorting algorithm is used for external sorting? Why? m) How is parity used for error control? Q2. Unit I a) Write a C program to create a linked list as a copy of an existing linked list. [6] b) Compare the advantages and disadvantages of representing polynomials using linked lists and arrays respectively? [4] Q3. a) Write C functions to implement a stack. Also write a function that uses your stack to reverse a string. [7] b) How would you ensure enqueue and dequeue operations on a linked queue, are performed in O (1)? Explain. [3] P.T.O

28 Q4 Unit II a) Write a function to clone a binary search tree. [5] b) Demonstrate (construct the tree and show the links and threads) threading for a right-in-threaded tree built using the input 12, 3, 23, 4, 2, 21 [5] Q5 a) Explain RR imbalance and the process of resolving it (with code snippets) using AVL rotations. [6] b) What is a B-tree? What is the need for B trees? [4] Q6 Unit- III a) Write the BFS algorithm for graph traversal [5] b) Demonstrate Quick Sort for following data set: 12, 3, 23, 45, 21, 22, 2, 50, 9, 32 [5] Q7 a) Demonstrate the running of Dijkstra s algorithm to find the shortest path between node A and all other nodes of the following graph. [5] 12 B 11 C D 10 E 12 F b) Explain different collision resolution techniques in Hashing. [5] Q8 Unit- IV a) Compare K-Way merge sort using K+1 and 2*K tapes. [5] b) Explain batch processing using Master and Transaction files. [5] Q9 a) Demonstrate how polyphase merge sort overcomes the problem of K-Way merge sort using K+1 tapes? b) Write a short note on buffering. *************

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC) SET - 1 II B. Tech I Semester Supplementary Examinations, May/June - 2016 PART A 1. a) Write a procedure for the Tower of Hanoi problem? b) What you mean by enqueue and dequeue operations in a queue? c)

More information

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Which of the given options provides the

More information

Course Name: B.Tech. 3 th Sem. No of hours allotted to complete the syllabi: 44 Hours No of hours allotted per week: 3 Hours. Planned.

Course Name: B.Tech. 3 th Sem. No of hours allotted to complete the syllabi: 44 Hours No of hours allotted per week: 3 Hours. Planned. Course Name: B.Tech. 3 th Sem. Subject: Data Structures No of hours allotted to complete the syllabi: 44 Hours No of hours allotted per week: 3 Hours Paper Code: ETCS-209 Topic Details No of Hours Planned

More information

Table of Contents. Chapter 1: Introduction to Data Structures... 1

Table of Contents. Chapter 1: Introduction to Data Structures... 1 Table of Contents Chapter 1: Introduction to Data Structures... 1 1.1 Data Types in C++... 2 Integer Types... 2 Character Types... 3 Floating-point Types... 3 Variables Names... 4 1.2 Arrays... 4 Extraction

More information

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION COURSE TITLE DATA STRUCTURE DETAILED SYLLABUS SR.NO NAME OF CHAPTERS & DETAILS HOURS ALLOTTED 1 USER DEFINED DATATYPE /STRUCTURE About structure Defining structure Accessing structure element Array of

More information

ASSIGNMENTS. Progra m Outcom e. Chapter Q. No. Outcom e (CO) I 1 If f(n) = Θ(g(n)) and g(n)= Θ(h(n)), then proof that h(n) = Θ(f(n))

ASSIGNMENTS. Progra m Outcom e. Chapter Q. No. Outcom e (CO) I 1 If f(n) = Θ(g(n)) and g(n)= Θ(h(n)), then proof that h(n) = Θ(f(n)) ASSIGNMENTS Chapter Q. No. Questions Course Outcom e (CO) Progra m Outcom e I 1 If f(n) = Θ(g(n)) and g(n)= Θ(h(n)), then proof that h(n) = Θ(f(n)) 2 3. What is the time complexity of the algorithm? 4

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK III SEMESTER CS8391-Data Structures Regulation 2017 Academic Year 2018 19(odd Semester)

More information

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name Course Code Class Branch DATA STRUCTURES ACS002 B. Tech

More information

GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING (07) / INFORMATION TECHNOLOGY (16) / INFORMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES

GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING (07) / INFORMATION TECHNOLOGY (16) / INFORMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING () / INFMATION TECHNOLOGY (6) / INFMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES Type of course: Compulsory SUBJECT CODE: 2302 B.E. 3 rd Semester

More information

PROGRAMMING IN C++ (Regulation 2008) Answer ALL questions PART A (10 2 = 20 Marks) PART B (5 16 = 80 Marks) function? (8)

PROGRAMMING IN C++ (Regulation 2008) Answer ALL questions PART A (10 2 = 20 Marks) PART B (5 16 = 80 Marks) function? (8) B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2009 EC 2202 DATA STRUCTURES AND OBJECT ORIENTED Time: Three hours PROGRAMMING IN C++ Answer ALL questions Maximum: 100 Marks 1. When do we declare a

More information

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE A6-R3: DATA STRUCTURE THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF

More information

Sample Question Paper

Sample Question Paper Scheme - I Sample Question Paper Marks : 70 Time: 3 Hrs. Q.1) Attempt any FIVE of the following. 10 Marks a. Write any four applications of data structure. b. Sketch the diagram of circular queue. c. State

More information

Department of Computer Science and Technology

Department of Computer Science and Technology UNIT : Stack & Queue Short Questions 1 1 1 1 1 1 1 1 20) 2 What is the difference between Data and Information? Define Data, Information, and Data Structure. List the primitive data structure. List the

More information

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 154) Pass Marks: 24

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 154) Pass Marks: 24 Prepared By ASCOL CSIT 2070 Batch Institute of Science and Technology 2065 Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 154) Pass

More information

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu. 17CA 104DATA STRUCTURES Academic Year : 018-019 Programme : MCA Year / Semester : I / I Question Bank Course Coordinator: Mrs. C.Mallika Course Objectives The student should be able to 1. To understand

More information

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305 Q.1 If h is any hashing function and is used to hash n keys in to a table of size m, where n

More information

Prepared By: Ms. Nidhi Solanki (Assist. Prof.) Page 1

Prepared By: Ms. Nidhi Solanki (Assist. Prof.) Page 1 QUESTION BANK ON COURSE: 304: PRELIMINARIES: 1. What is array of pointer, explain with appropriate example? 2 2. Differentiate between call by value and call by reference, give example. 3. Explain pointer

More information

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 60 0 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK III SEMESTER CS89- DATA STRUCTURES Regulation 07 Academic Year 08 9 Prepared by

More information

Total No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC First Semester CSE/IT DATA STRUCTURES USING C

Total No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC First Semester CSE/IT DATA STRUCTURES USING C CSE/IT 216 (CR) Total No. of Questions :09] [Total No. of Pages : 02 Time: Three Hours 1. a. ADT II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC- 2015 First Semester CSE/IT DATA STRUCTURES USING C Answer Question

More information

17CS33:Data Structures Using C QUESTION BANK

17CS33:Data Structures Using C QUESTION BANK 17CS33:Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C Learn : Usage of structures, unions - a conventional tool for handling a group of logically

More information

Course Review for Finals. Cpt S 223 Fall 2008

Course Review for Finals. Cpt S 223 Fall 2008 Course Review for Finals Cpt S 223 Fall 2008 1 Course Overview Introduction to advanced data structures Algorithmic asymptotic analysis Programming data structures Program design based on performance i.e.,

More information

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 CS205: DATA STRUCTURES (CS, IT)

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 CS205: DATA STRUCTURES (CS, IT) D B3D042 Pages: 2 Reg. No. Name: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Max. Marks: 100 CS205: DATA STRUCTURES (CS, IT) PART A Answer all questions.

More information

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE A6-R3: DATA STRUCTURE THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF

More information

& ( D. " mnp ' ( ) n 3. n 2. ( ) C. " n

& ( D.  mnp ' ( ) n 3. n 2. ( ) C.  n CSE Name Test Summer Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to multiply two n " n matrices is: A. " n C. "% n B. " max( m,n, p). The

More information

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

CS8391-DATA STRUCTURES QUESTION BANK UNIT I CS8391-DATA STRUCTURES QUESTION BANK UNIT I 2MARKS 1.Define data structure. The data structure can be defined as the collection of elements and all the possible operations which are required for those

More information

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May Code No: R21051 R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 DATA STRUCTURES (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 Answer any FIVE Questions All Questions carry

More information

QUESTION BANK. Prepared by,mrs.d.maladhy AP/IT,RGCET. Page 1

QUESTION BANK. Prepared by,mrs.d.maladhy AP/IT,RGCET. Page 1 UNIT I 1.Write statements to declare integer Pointer and Float Pointer. Also write the statement to convert float pointer.(apr/may 2016) 2. What is a Stack? Mention the order followed to add or delete

More information

CS301 - Data Structures Glossary By

CS301 - Data Structures Glossary By CS301 - Data Structures Glossary By Abstract Data Type : A set of data values and associated operations that are precisely specified independent of any particular implementation. Also known as ADT Algorithm

More information

MLR Institute of Technology

MLR Institute of Technology MLR Institute of Technology Laxma Reddy Avenue, Dundigal, Quthbullapur (M), Hyderabad 500 043 Phone Nos: 08418 204066 / 204088, Fax : 08418 204088 TUTORIAL QUESTION BANK Course Name : DATA STRUCTURES Course

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) Exam. Roll No... END-TERM EXAMINATION Paper Code : MCA-205 DECEMBER 2006 Subject: Design and analysis of algorithm Time: 3 Hours Maximum Marks: 60 Note: Attempt

More information

PESIT Bangalore South Campus Department of MCA Course Information for

PESIT Bangalore South Campus Department of MCA Course Information for 1. GENERAL INFORMATION: PESIT Bangalore South Campus Department of MCA Course Information for Data Structures Using C(13MCA21) Academic Year: 2015 Semester: II Title Code Duration (hrs) Lectures 48 Hrs

More information

CS8391-DATA STRUCTURES

CS8391-DATA STRUCTURES ST.JOSEPH COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERI NG CS8391-DATA STRUCTURES QUESTION BANK UNIT I 2MARKS 1.Explain the term data structure. The data structure can be defined

More information

( ) ( ) C. " 1 n. ( ) $ f n. ( ) B. " log( n! ) ( ) and that you already know ( ) ( ) " % g( n) ( ) " #&

( ) ( ) C.  1 n. ( ) $ f n. ( ) B.  log( n! ) ( ) and that you already know ( ) ( )  % g( n) ( )  #& CSE 0 Name Test Summer 008 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time for the following code is in which set? for (i=0; i

More information

logn D. Θ C. Θ n 2 ( ) ( ) f n B. nlogn Ο n2 n 2 D. Ο & % ( C. Θ # ( D. Θ n ( ) Ω f ( n)

logn D. Θ C. Θ n 2 ( ) ( ) f n B. nlogn Ο n2 n 2 D. Ο & % ( C. Θ # ( D. Θ n ( ) Ω f ( n) CSE 0 Test Your name as it appears on your UTA ID Card Fall 0 Multiple Choice:. Write the letter of your answer on the line ) to the LEFT of each problem.. CIRCLED ANSWERS DO NOT COUNT.. points each. The

More information

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours TED (10)-3071 Reg. No.. (REVISION-2010) (Maximum marks: 100) Signature. FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours PART

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : DATA STRUCTURES Course Code : A30502 Class : II B.

More information

Question Paper Code : 97044

Question Paper Code : 97044 Reg. No. : Question Paper Code : 97044 B.E./B.Tech. DEGREE EXAMINATION NOVEMBER/DECEMBER 2014 Third Semester Computer Science and Engineering CS 6301 PROGRAMMING AND DATA STRUCTURES-II (Regulation 2013)

More information

D. Θ nlogn ( ) D. Ο. ). Which of the following is not necessarily true? . Which of the following cannot be shown as an improvement? D.

D. Θ nlogn ( ) D. Ο. ). Which of the following is not necessarily true? . Which of the following cannot be shown as an improvement? D. CSE 0 Name Test Fall 00 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to convert an array, with priorities stored at subscripts through n,

More information

12 Abstract Data Types

12 Abstract Data Types 12 Abstract Data Types 12.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT). Define

More information

Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis

Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis p. 5 Statement Constructs p. 5 Pseudocode Example p.

More information

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE TED (10)-3071 Reg. No.. (REVISION-2010) Signature. FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours (Maximum marks: 100)

More information

( ) + n. ( ) = n "1) + n. ( ) = T n 2. ( ) = 2T n 2. ( ) = T( n 2 ) +1

( ) + n. ( ) = n 1) + n. ( ) = T n 2. ( ) = 2T n 2. ( ) = T( n 2 ) +1 CSE 0 Name Test Summer 00 Last Digits of Student ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. Suppose you are sorting millions of keys that consist of three decimal

More information

Tribhuvan University Institute of Science and Technology Computer Science and Information Technology (CSC. 154) Section A Attempt any Two questions:

Tribhuvan University Institute of Science and Technology Computer Science and Information Technology (CSC. 154) Section A Attempt any Two questions: Tribhuvan University 2065 Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSC. 154) Pass Marks: 24 (Data Structure and Algorithm) Time:

More information

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \ BSc IT C Programming (2013-2017) Unit I Q1. What do you understand by type conversion? (2013) Q2. Why we need different data types? (2013) Q3 What is the output of the following (2013) main() Printf( %d,

More information

Visit ::: Original Website For Placement Papers. ::: Data Structure

Visit  ::: Original Website For Placement Papers. ::: Data Structure Data Structure 1. What is data structure? A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship

More information

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should Use better data structures

More information

Data Structures Question Bank Multiple Choice

Data Structures Question Bank Multiple Choice Section 1. Fundamentals: Complexity, Algorthm Analysis 1. An algorithm solves A single problem or function Multiple problems or functions Has a single programming language implementation 2. A solution

More information

CS 8391 DATA STRUCTURES

CS 8391 DATA STRUCTURES DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK CS 8391 DATA STRUCTURES UNIT- I PART A 1. Define: data structure. A data structure is a way of storing and organizing data in the memory for

More information

Data Structures. 1. Each entry in a linked list is a called a (a)link (b)node (c)data structure (d)none of the above

Data Structures. 1. Each entry in a linked list is a called a (a)link (b)node (c)data structure (d)none of the above Data Structures 1. Each entry in a linked list is a called a --------- (a)link (b)node (c)data structure (d)none of the above 2. Linked list uses type of memory allocation (a)static (b)dynamic (c)random

More information

) $ f ( n) " %( g( n)

) $ f ( n)  %( g( n) CSE 0 Name Test Spring 008 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to compute the sum of the n elements of an integer array is: # A.

More information

Objective Questions for Online Practical Exams under CBCS Scheme Subject: Data Structure-I (CS-113)

Objective Questions for Online Practical Exams under CBCS Scheme Subject: Data Structure-I (CS-113) Objective Questions for Online Practical Exams under CBCS Scheme Subject: Data Structure-I (CS-113) 1. The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort (A)

More information

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms... First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms.... Q1) What are some of the applications for the tree data structure? Q2) There are 8, 15, 13, and

More information

( ). Which of ( ) ( ) " #& ( ) " # g( n) ( ) " # f ( n) Test 1

( ). Which of ( ) ( )  #& ( )  # g( n) ( )  # f ( n) Test 1 CSE 0 Name Test Summer 006 Last Digits of Student ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to multiply two n x n matrices is: A. "( n) B. "( nlogn) # C.

More information

( ) n 3. n 2 ( ) D. Ο

( ) n 3. n 2 ( ) D. Ο CSE 0 Name Test Summer 0 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to multiply two n n matrices is: A. Θ( n) B. Θ( max( m,n, p) ) C.

More information

Course goals. exposure to another language. knowledge of specific data structures. impact of DS design & implementation on program performance

Course goals. exposure to another language. knowledge of specific data structures. impact of DS design & implementation on program performance Course goals exposure to another language C++ Object-oriented principles knowledge of specific data structures lists, stacks & queues, priority queues, dynamic dictionaries, graphs impact of DS design

More information

Department of Computer Applications. MCA 312: Design and Analysis of Algorithms. [Part I : Medium Answer Type Questions] UNIT I

Department of Computer Applications. MCA 312: Design and Analysis of Algorithms. [Part I : Medium Answer Type Questions] UNIT I MCA 312: Design and Analysis of Algorithms [Part I : Medium Answer Type Questions] UNIT I 1) What is an Algorithm? What is the need to study Algorithms? 2) Define: a) Time Efficiency b) Space Efficiency

More information

CS521 \ Notes for the Final Exam

CS521 \ Notes for the Final Exam CS521 \ Notes for final exam 1 Ariel Stolerman Asymptotic Notations: CS521 \ Notes for the Final Exam Notation Definition Limit Big-O ( ) Small-o ( ) Big- ( ) Small- ( ) Big- ( ) Notes: ( ) ( ) ( ) ( )

More information

a) State the need of data structure. Write the operations performed using data structures.

a) State the need of data structure. Write the operations performed using data structures. Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model answer and the answer written by candidate

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 18 EXAMINATION Subject Name: Data Structure Model wer Subject Code: 17330 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in

More information

2. (a) Explain when the Quick sort is preferred to merge sort and vice-versa.

2. (a) Explain when the Quick sort is preferred to merge sort and vice-versa. Code No: RR210504 Set No. 1 1. (a) Order the following functions according to their order of growth (from the lowest to the highest). (n-2)!, 5 log (n+100) 10,2 2n, 0.001n 4 +3n 3 +1, ln 2 n, n 1/3, 3

More information

Course Review. Cpt S 223 Fall 2009

Course Review. Cpt S 223 Fall 2009 Course Review Cpt S 223 Fall 2009 1 Final Exam When: Tuesday (12/15) 8-10am Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & class notes Homeworks & program

More information

( ) D. Θ ( ) ( ) Ο f ( n) ( ) Ω. C. T n C. Θ. B. n logn Ο

( ) D. Θ ( ) ( ) Ο f ( n) ( ) Ω. C. T n C. Θ. B. n logn Ο CSE 0 Name Test Fall 0 Multiple Choice. Write your answer to the LEFT of each problem. points each. The expected time for insertion sort for n keys is in which set? (All n! input permutations are equally

More information

COSC 2007 Data Structures II Final Exam. Part 1: multiple choice (1 mark each, total 30 marks, circle the correct answer)

COSC 2007 Data Structures II Final Exam. Part 1: multiple choice (1 mark each, total 30 marks, circle the correct answer) COSC 2007 Data Structures II Final Exam Thursday, April 13 th, 2006 This is a closed book and closed notes exam. There are total 3 parts. Please answer the questions in the provided space and use back

More information

Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms... Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms.... Q1) Let the keys are 28, 47, 20, 36, 43, 23, 25, 54 and table size is 11 then H(28)=28%11=6; H(47)=47%11=3;

More information

Multiple Choice. Write your answer to the LEFT of each problem. 3 points each

Multiple Choice. Write your answer to the LEFT of each problem. 3 points each CSE 0-00 Test Spring 0 Name Last 4 Digits of Student ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. Suppose f ( x) is a monotonically increasing function. Which of the

More information

( D. Θ n. ( ) f n ( ) D. Ο%

( D. Θ n. ( ) f n ( ) D. Ο% CSE 0 Name Test Spring 0 Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to run the code below is in: for i=n; i>=; i--) for j=; j

More information

S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100

S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100 Total No. of Questions 12] [Total No. of Printed Pages 7 [4062]-204 S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100

More information

Algorithms and programs, basic idea of pseudo-code.algorithm efficiency and analysis, time and space analysis of algorithms order notations.

Algorithms and programs, basic idea of pseudo-code.algorithm efficiency and analysis, time and space analysis of algorithms order notations. B. P. Poddar Institute of Management & Technology Department of Information Technology Course Syllabus : Data Structure & Algorithm Academic Year:.18-19... Semester:...3rd... Module -I. [8L] Linear Data

More information

9. The expected time for insertion sort for n keys is in which set? (All n! input permutations are equally likely.)

9. The expected time for insertion sort for n keys is in which set? (All n! input permutations are equally likely.) CSE 0 Name Test Spring 006 Last 4 Digits of Student ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. Suppose f ( x) is a monotonically increasing function. Which of the

More information

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE0301. Subject Name: Data Structure. B.Tech. Year - II

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE0301. Subject Name: Data Structure. B.Tech. Year - II Subject Code: 01CE0301 Subject Name: Data Structure B.Tech. Year - II Objective: Data structure has high importance in the field of Computer & IT. Organization of data is crucial for implementation and

More information

( ) 1 B. 1. Suppose f x

( ) 1 B. 1. Suppose f x CSE Name Test Spring Last Digits of Student ID Multiple Choice. Write your answer to the LEFT of each problem. points each is a monotonically increasing function. Which of the following approximates the

More information

MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct.

MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct. MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct. In linked list the elements are necessarily to be contiguous In linked list the elements may locate at far positions

More information

Fundamentals of Data Structure

Fundamentals of Data Structure Fundamentals of Data Structure Set-1 1. Which if the following is/are the levels of implementation of data structure A) Abstract level B) Application level C) Implementation level D) All of the above 2.

More information

Midterm solutions. n f 3 (n) = 3

Midterm solutions. n f 3 (n) = 3 Introduction to Computer Science 1, SE361 DGIST April 20, 2016 Professors Min-Soo Kim and Taesup Moon Midterm solutions Midterm solutions The midterm is a 1.5 hour exam (4:30pm 6:00pm). This is a closed

More information

n 2 ( ) ( ) Ο f ( n) ( ) Ω B. n logn Ο

n 2 ( ) ( ) Ο f ( n) ( ) Ω B. n logn Ο CSE 220 Name Test Fall 20 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 4 points each. The time to compute the sum of the n elements of an integer array is in:

More information

UCS-406 (Data Structure) Lab Assignment-1 (2 weeks)

UCS-406 (Data Structure) Lab Assignment-1 (2 weeks) UCS-40 (Data Structure) Lab Assignment- (2 weeks) Implement the following programs in C/C++/Python/Java using functions a) Insertion Sort b) Bubble Sort c) Selection Sort d) Linear Search e) Binary Search

More information

Final Examination CSE 100 UCSD (Practice)

Final Examination CSE 100 UCSD (Practice) Final Examination UCSD (Practice) RULES: 1. Don t start the exam until the instructor says to. 2. This is a closed-book, closed-notes, no-calculator exam. Don t refer to any materials other than the exam

More information

Data Structure. IBPS SO (IT- Officer) Exam 2017

Data Structure. IBPS SO (IT- Officer) Exam 2017 Data Structure IBPS SO (IT- Officer) Exam 2017 Data Structure: In computer science, a data structure is a way of storing and organizing data in a computer s memory so that it can be used efficiently. Data

More information

Revision Statement while return growth rate asymptotic notation complexity Compare algorithms Linear search Binary search Preconditions: sorted,

Revision Statement while return growth rate asymptotic notation complexity Compare algorithms Linear search Binary search Preconditions: sorted, [1] Big-O Analysis AVERAGE(n) 1. sum 0 2. i 0. while i < n 4. number input_number(). sum sum + number 6. i i + 1 7. mean sum / n 8. return mean Revision Statement no. of times executed 1 1 2 1 n+1 4 n

More information

n 2 ( ) ( ) + n is in Θ n logn

n 2 ( ) ( ) + n is in Θ n logn CSE Test Spring Name Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to multiply an m n matrix and a n p matrix is in: A. Θ( n) B. Θ( max(

More information

CS DATA STRUCTURES AND ALGORITHMS

CS DATA STRUCTURES AND ALGORITHMS Computer Science and Engineering Third Semester CS1211 - DATA STRUCTURES AND ALGORITHMS UNIT-I - INTRODUCTION TO DATASTRUCTURES 1.Write down the definition of data structures? PART -A A data structure

More information

Test 1 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 2 points each t 1

Test 1 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 2 points each t 1 CSE 0 Name Test Fall 00 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each t. What is the value of k? k=0 A. k B. t C. t+ D. t+ +. Suppose that you have

More information

Algorithm Design (8) Graph Algorithms 1/2

Algorithm Design (8) Graph Algorithms 1/2 Graph Algorithm Design (8) Graph Algorithms / Graph:, : A finite set of vertices (or nodes) : A finite set of edges (or arcs or branches) each of which connect two vertices Takashi Chikayama School of

More information

Frequently asked Data Structures Interview Questions

Frequently asked Data Structures Interview Questions Frequently asked Data Structures Interview Questions Queues Data Structure Interview Questions How is queue different from a stack? The difference between stacks and queues is in removing. In a stack we

More information

1) What is the primary purpose of template functions? 2) Suppose bag is a template class, what is the syntax for declaring a bag b of integers?

1) What is the primary purpose of template functions? 2) Suppose bag is a template class, what is the syntax for declaring a bag b of integers? Review for Final (Chapter 6 13, 15) 6. Template functions & classes 1) What is the primary purpose of template functions? A. To allow a single function to be used with varying types of arguments B. To

More information

Reg. No. : Question Paper Code : 27157

Reg. No. : Question Paper Code : 27157 WK 3 Reg. No. : Question Paper Code : 27157 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2015. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES

More information

DS ata Structures Aptitude

DS ata Structures Aptitude DS ata Structures Aptitude 1. What is data structure? A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge

More information

Discuss the following operations on One-Dimensional array with algorithms.

Discuss the following operations on One-Dimensional array with algorithms. (i). Searching (ii). Sorting (iii). Traversing (16CS503) DATA STRUCTURES THROUGH C UNIT-I Discuss the following operations on One-Dimensional array with algorithms. 2.Discuss the following operations on

More information

Adapted By Manik Hosen

Adapted By Manik Hosen Adapted By Manik Hosen Question: What is Data Structure? Ans: The logical or mathematical model of particular organization of data is called Data Structure. Question: What are the difference between linear

More information

The ADT priority queue Orders its items by a priority value The first item removed is the one having the highest priority value

The ADT priority queue Orders its items by a priority value The first item removed is the one having the highest priority value The ADT priority queue Orders its items by a priority value The first item removed is the one having the highest priority value 1 Possible implementations Sorted linear implementations o Appropriate if

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R05010106 Set No. 1 1. (a) Draw a Flowchart for the following The average score for 3 tests has to be greater than 80 for a candidate to qualify for the interview. Representing the conditional

More information

Lecture Summary CSC 263H. August 5, 2016

Lecture Summary CSC 263H. August 5, 2016 Lecture Summary CSC 263H August 5, 2016 This document is a very brief overview of what we did in each lecture, it is by no means a replacement for attending lecture or doing the readings. 1. Week 1 2.

More information

DATA STRUCTURES THROUGH C++

DATA STRUCTURES THROUGH C++ II Year I Semester DATA STRUCTURES THROUGH C++ L T P C 4 0 0 3 OBJECTIVES: To be familiar with basic techniques of object oriented principles and exception handling using C++ To be familiar with the concepts

More information

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR STUDENT IDENTIFICATION NO MULTIMEDIA COLLEGE JALAN GURNEY KIRI 54100 KUALA LUMPUR FIFTH SEMESTER FINAL EXAMINATION, 2014/2015 SESSION PSD2023 ALGORITHM & DATA STRUCTURE DSEW-E-F-2/13 25 MAY 2015 9.00 AM

More information

n 2 C. Θ n ( ) Ο f ( n) B. n 2 Ω( n logn)

n 2 C. Θ n ( ) Ο f ( n) B. n 2 Ω( n logn) CSE 0 Name Test Fall 0 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. The time to find the maximum of the n elements of an integer array is in: A.

More information

ROOT: A node which doesn't have a parent. In the above tree. The Root is A.

ROOT: A node which doesn't have a parent. In the above tree. The Root is A. TREE: A tree is a finite set of one or more nodes such that there is a specially designated node called the Root, and zero or more non empty sub trees T 1, T 2...T k, each of whose roots are connected

More information

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F))

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F)) DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING EC6301 OBJECT ORIENTED PROGRAMMING AND DATA STRUCTURES UNIT IV NONLINEAR DATA STRUCTURES Part A 1. Define Tree [N/D 08]

More information

DATA STRUCTURES AND ALGORITHMS

DATA STRUCTURES AND ALGORITHMS DATA STRUCTURES AND ALGORITHMS UNIT 1 - LINEAR DATASTRUCTURES 1. Write down the definition of data structures? A data structure is a mathematical or logical way of organizing data in the memory that consider

More information

Computer Science 302 Spring 2017 (Practice for) Final Examination, May 10, 2017

Computer Science 302 Spring 2017 (Practice for) Final Examination, May 10, 2017 Computer Science 302 Spring 2017 (Practice for) Final Examination, May 10, 2017 Name: The entire practice examination is 1005 points. 1. True or False. [5 points each] The time to heapsort an array of

More information

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3 UNIT 3 LINEAR DATA STRUCTURES 1. Define Data Structures Data Structures is defined as the way of organizing all data items that consider not only the elements stored but also stores the relationship between

More information