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

Size: px
Start display at page:

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

Transcription

1 R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Which of the given options provides the increasing order of asymptotic complexity of the n 3 / 2 functions: f 1, f 2, f3 and f 4? f1 ( n) = 2 f 2 ( n) = n f3 ( n) = nlog 2 n log 2 n f 4 ( n) = n b) i) Write a recursive C function to compute n Fibonacci numbers of the following: 1, if n = 0 f ( n) = 1, if n = 1 f ( n 1) + f ( n 2) f 7? ii) How many times f is called (including the first call) for an evaluation of ( ) 2. a) Consider an array: {25, 14, 16, 13, 10, 8, 12} represents a binary max-heap. What is the content of the array after two delete operations on a binary max-heap? b) Write a recursive quick sort algorithm. Trace the algorithm to sort the following elements: 72, 15, 22, 11, 18, 56, 40, 45 (5M+10M) 3. a) What is an equivalent infix form of the following postfix form of arithmetic expression? A B C C D E + / b) Let a circular queue is maintained in an array A[0..n-1]. What is the size of the queue in terms of F and R, where F, R indicate the FRONT and REAR indices? c) Write a C program to implement the circular queue operations using arrays. (3M+3M+9M) 4. a) Write a C program to create a doubly linked list and display all the elements in the list? b) Compare singly and doubly linked lists to perform insertion and operations. 5. a) A complete n array tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n array tree. If L = 41and I = 10, then what is the value of n? b) Consider the following in-order and pre-order traversal of a binary tree. What is the postorder traversal of a binary tree? In-order Traversal: D B F E G H A C Pre-order raversal: A B D E F G H C 1 of 2

2 Code No-: R21051 R10 SET a) What is a threaded binary tree? Explain with an example. b) The following numbers are inserted into an empty binary search tree in the given order one by one: 15, 32, 20, 9, 3, 25, 12, 1. i) Show the final binary search tree after the insertions. ii) Draw the binary search tree after deleting 15 from it. (5M+10M) 7. a) Explain the graph traversal methods with suitable examples. b) How many minimum spanning trees does the following graph have? Draw all of them. 8. a) Explain the representation of sets using linked lists. b) What is an ADT? What are the ADT operations? Explain ADT implementation of a stack. (5M+10M) 2 of 2

3 Code No-: R21051 R10 SET - 2 II B. Tech I Semester, Supplementary Examinations, May (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Find the values of f (513, 2) and f (345, 10) for the following recursive function definition: n n mod r + f, r, if n > 0 f ( n, r) = r 0, otherwise b) Write a recursive binary search algorithm. Trace the algorithm to search the element -5 in the list of elements: -5, -3, -1, 0, 10, 15, 20, a) What is a natural merge sort? A natural merge sort is to be used to sort the file of integers: 12, 37, 42, 9, 5, 7, 50, 40, 45, and 92. What is the order of the numbers after one pass of the sort? b) Write a selection sort algorithm. Trace the algorithm to sort the following elements: 72, 15, 22, 11, 18, 56, 40, 45 (5M+10M) 3. a) What is an equivalent infix form of the following postfix form of arithmetic expression? + A B C D / E / F + G H, where represents exponentiation b) What is the minimum number of stacks of size n required to implement a queue of size n? Explain. c) Write a C program to convert an infix expression to a postfix expression. (3M+3M+9M) 4. a) What are the lists of operations that can be performed on a singly linked list? Explain how to perform insertion and deletion operations in the middle of a singly linked list. b) What is a circularly linked list? Write a C program to display the number of elements in a circularly linked list. 1 of 2

4 Code No-: R21051 R10 SET a) What is the total number of distinct binary trees with n nodes? Draw all the distinct binary trees with 5 nodes. b) Consider the following weighted binary tree: i) What is the weighted external path length of the binary tree? ii) What is the weighted degree path length of the binary tree? 6. a) A binary search tree is generated by inserting in order of the integers: 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. What is the total number of nodes in the left sub-tree and the right sub-tree? b) What is a balanced binary tree? What is the maximum height of any balanced binary tree with 33 nodes? Assume that the height of a tree with a single node is a) Consider the graph, G with 12 edges. It has 6 vertices of degree 3 and the rest have degree less than 3. Determine the minimum number of vertices. b) Consider a weighted undirected graph with vertex set V = {a, b, c, d, e, f, g, h, i, j} and edge set E = {(a, b, 6), (a, c, 1), (a, d, 2), (a, e, 8), (b, d, 3), (b, g, 2), (c, d, 2), (d, h, 15), (e, f, 11), (e, h, 8), (e, i, 2), (f, h, 4), (f, i, 9), (g, h, 8), (g, i, 14), (g, j, 19), (h, i, 4), (i, j, 5)}. The third value in the tuple represents the weight of the edge specified in the tuple. What is the weight of a minimum spanning tree of the weighted undirected graph? (5M+10M) 8. a) What is an ADT? What are the ADT operations? Explain ADT implementation of a queue. b) Explain the information storage using bit strings. (10 +5M) 2 of 2

5 Code No-: R21051 R10 SET - 3 II B. Tech I Semester, Supplementary Examinations, May (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** f 5861, 7 for the following recursive function definition: 0, x < y f ( x, y) = f ( x y, y) + 1, y x b) Write a recursive C function to solve the problem oftowers of Hanoi. Trace the C function for an optimal execution time of the Towers of Hanoi problem with n = 8 discs. 1. a) Find the value of ( ) 2. a) The elements 32, 15, 20, 30, 12, 25 and 16 are inserted one by one in the given order into MaxHeap. What is the resultant MaxHeap? b) Write a recursive quick sort algorithm. Trace the algorithm to sort the following elements: 25, 7, 34, 2, 70, 9, 61, 16, 49, 19 (5M+10M) 3. a) What is an equivalent infix form of the following postfix form of arithmetic expression? A B C C D E + / b) What is a priority queue? Explain with an example. c) Write a C program to implement the queue operations using stack. (3M+3M+9M) 4. a) What is a linked list? Explain the different types of linked lists. b) What is a sparse matrix? Write C program to add two sparse matrices using linked lists. 5. a) What is the total number of distinct binary trees with 12 nodes? b) Consider the following in-order and post-order traversal of a binary tree. What is the pre-order traversal of a binary tree? In-order Traversal: B C A E D G H F I Post-order Traversal: C B E H G I F D A 6. a) The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree? b) What is a balance factor of a binary tree? Mark the balance factor of each node of the following binary tree and state whether it is height balanced or not. 1 of 2

6 Code No-: R21051 R10 SET Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in the matrix W below is the weight of the edge{ i, j} W = i) What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T? ii) What is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges? 8. a) Explain the representation of sets using linked lists. b) What is an ADT? What are the ADT operations? Explain ADT implementation of a stack. (5M+10M) 2 of 2

7 Code No-: R21051 R10 SET - 4 II B. Tech I Semester, Supplementary Examinations, May (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) There are four different algorithms: A1, A2, A3, A4 to solve a given problem with the complexity n order: log n, log log 2 n, nlog 2 n, and respectively. What is the best algorithm? log 2 n Why? b) How many times f is called for an evaluation of f ( 95) in the following recursive function? n 10, if n > 100 f ( n) = f ( f ( n + 11) ), otherwise c) What is the average successful search time taken by binary search on a sorted array of 10 data items? (5M+5M+5M) 2. a) What is a randomized quick sort? Explain with an example. b) How many swapping are needed to sort the following numbers in ascending order using bubble sort? : 8, 22, 7, 9, 31, 19, 5, 13 c) If one uses straight two-way merge sort algorithm to sort the elements: 20, 47, 15, 8, 9, 4, 40, 30, 12, 17 in ascending order, and then what is the order of these elements after the second pass of the algorithm? (5M+5M+5M) 3. a) What is an equivalent infix form of the following postfix form of arithmetic expression? + A B C D / E / F + G H, where represents exponentiation b) If memory for the run time stack is only 150 cells (words), how big can n be in n! before encountering a stack overflow? c) Write a C program to implement the round-robin algorithm. Trace the program with an appropriate input data. (3M+3M+9M) 4. a) What is a circularly linked list? Write a C program to display the number of elements in a circularly linked list. b) What are the lists of operations that can be performed on a doubly linked list? Explain how to perform insertion and deletion operations in the middle of a doubly linked list. 1 of 2

8 Code No-: R21051 R10 SET a) Compare trees and binary trees. b) The set: (A, (B, (E, F)), (C, (G)), (D, (H, I, J))) represents a tree. Find the number of leaf nodes in the binary tree representation of this tree. c) Consider a complete k array tree, where every internal node has exactly k children. What is the total number of leaves in such a tree with n internal nodes? (5M+5M+5M) 6. a) How many nodes will become unbalanced when a node is inserted as a child of the node G of the following balanced binary tree? b) A binary search tree is used to locate the number 43. Which of the following probe sequences are possible and which are not? Explain. ( ) ( ) ( ) ( ) ( ) (5M+10M) 7. a) If the simple graph G has n vertices and e edges, how many edges does the G, complement of G have? If the simple graph G has 15 edges and G has 13 edges, how many vertices does G have? b) A complete, undirected, weighted graph G is given on the vertex set {0, 1, 2,..., n-1}for any fixed n. Draw the minimum spanning tree of G if: i) The weight of the edge (u, v) is u v ii) The weight of the edge (u, v) is i ii iii iv v u + v 8. a) Explain the information storage using bit strings. b) What is an ADT? What are the ADT operations? Explain ADT implementation of a queue. (5M+10M) 2 of 2

9 R10 SET - 1 II B. Tech I Semester Supplementary Examinations Dec a) Define recursion. Explain the properties of recursion. b) Write a recursive algorithm to solve the problem of Tower of Hanoi. (5M+10M) 2. a) Compare the quick sort and heap sort methods. b) Explain the quick sort method to sort the following elements (5M+10M) 3. a) Given a sequence of push and pop operations and an integer representing the size of an array in which a stack is to be implemented. Design an algorithm to determine whether or not overflow occurs. The algorithm should use a stack. b) Explain what test is required for exceptional conditions in pop operations. 4. a) What is doubly linked list. Write an algorithm to insert and delete a node in a doubly linked list. b) Explain various advantages and disadvantages of single linked list. (10M+5M) 5. Write a C program to create a binary tree and traversing the same in pre-order and post-order. (15M) 6. a) Explain the properties of a binary search tree in detail. b) Create a binary search tree using the following data entered as a sequential set Write an algorithm that prints the minimum spanning tree of a graph. At the end, print the weights of the spanning tree. A suggested report format is shown in the following example Source vertex To vertex Weight A B 2 A C 4 B D 3 D E 1 Total weight of spanning tree: 10 (15M) 8. a) Explain in detail about information storage using bit strings. b) How do you represent sets using linked lists? Explain.

10 R10 SET - 2 II B. Tech I Semester Supplementary Examinations Dec a) Describe about design methodology and implementation of recursive algorithm for finding Fibonacci series. b) Explain in detail the recursive Fibonacci series algorithm. (4M+11M) 2. Write an algorithm for quick sort and implement it with C. What is its time complexity? (15M) 3. a) Define infix, pre-fix and post-fix of an expression. b) Change the following infix expression to post-fix expression using stack algorithm (A+B)*C-D*F+C (5M+10M) 4. a) Compare singly and doubly linked list. b) What is singly linked list? Write an algorithm to insert and delete a node in a singly linked list. (5M+10M) 5. a) What is a binary tree? Explain the properties of a binary tree. b) Describe various binary tree traversals. 6. Explain in detail about creation of a binary search tree and insertion of a mode into a binary search tree with suitable example. (15M) 7. a) List and explain the basic operations on a graph. b) Write a C program for depth first search of a graph. 8. a) Explain in detail ADT implementation of queue. b) Describe about operations of sets using linked tests.

11 R10 SET - 3 II B. Tech I Semester Supplementary Examinations Dec a) Explain the methodology and implementation of recursive algorithms. b) Explain in detail the recursive factorial function of a positive integer n. (5M+10M) 2. a) Explain various exchange sorting algorithms in detail. b) Describe the distribution (radix sort) algorithm. 3. a) Define stack ADT. Explain basic operations of a stack ADT. b) Explain the stack application of infix to post-fix algorithm. (5M+10M) 4. a) Write an algorithm to insert and delete a node in a doubly linked list. b) Write an algorithm to merge two single linked list into one list and explain. 5. Write a C program for creating, inserting and deleting a mode in binary tree. (15M) 6. a) Explain the properties of a binary search tree in detail. b) Create a binary search tree using the following data entered as a sequential set Explain the following algorithms in detail i) Prim s algorithm ii) Warshall s algorithm 8. a) Explain in detail about the operations of sets using linked lists. b) Describe about ADT implementation using stacks. (15M)

12 R10 SET - 4 II B. Tech I Semester Supplementary Examinations Dec a) Explain the algorithm analysis and complexity in detail. b) Explain the binary search in detail and derive the time complexity. 2. Explain bubble sort and insertion sort with suitable example. (15M) 3. a) Define a queue and explain various operations of a queue. b) Implement circular queue operations using a linked list. 4. a) Explain the following applications of a linked list i) Representation of a polynomial expression ii) Sparse matrix manipulation b) Explain various applications of doubly linked list. (10M+5M) 5. a) Describe different types of trees in a detail. b) Write a C program to implement a binary tree. 6. Explain in detail the deletion of a node from a binary tree with one suitable example. (15M) 7. Explain BFS and DFS algorithms in detail. (15M) 8. a) Explain in detail ADT implementation of stack. b) Describe about representation of sets using linked list.

13 R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May a) How do you find the time complexity of an algorithm? Explain with an example b) Explain the recursive algorithm for Towers of Hanoi problem. 2. Write the Quick Sort algorithm and derive the time complexity of it 3. a) What are the various applications of stack? Explain b) Explain basic Queue operations in detail. 4. a) Explain the operations of Circular linked list. b) List out the applications of queues. 5. Explain the recursive binary tree traversal methods. 6. a) Explain the linked representation of a threaded binary tree. b) What is a balanced binary tree? Describe need of balanced binary tree in computer science. 7. a) Write Warshall s algorithm to find a minimum cost spanning track b) Explain the linked list representation of a Graph. 8. a) Explain the operations of sets using linked lists. b) Explain the model for an abstract data type.

14 R10 SET - 2 II B. Tech I Semester, Supplementary Examinations, May a) What are the measures for finding the efficiency of an algorithm? b) What is the average successful search time taken by binary search on a sorted array of 10 data items? 2. Write the Heap sort algorithm and derive the time complexity of its. 3. a) Write the algorithm to convert from infix to postfix form. b) What is priority Queues? Explain its implementation 4. a) Write the algorithm for sparse matrix multiplication using single linked list. b) Explain in detail an algorithm for implementing circular linked list operations 5. Write an algorithm for implementing various operations on binary tree. 6. Write an algorithm to insert a node at right subtree of a threaded binary tree. 7. a) Write the depth-first-search algorithm in detail. b) What is minimum spanning tree? How to find minimum spanning tree for a graph? Explain. 8. a) Explain the representation of sets using linked list. b) Give ADT implementation of Queue.

15 R10 SET - 3 II B. Tech I Semester, Supplementary Examinations, May a) How the recursive programs are analyzed? Explain in detail b) Write the recursive algorithm for binary search. 2. Explain the insertion sort algorithm along with its complexities. 3. a) Write the algorithm for evaluating arithmetic expressions using Stacks. b) What is Dequeue? Explain the Dequeue operations. 4. a) Write an algorithm to perform various operations on a doubly linked list. b) What are the various advantages and disadvantages of single linked list? 5. a) Explain the various properties of binary trees. b) Explain the creation of a binary tree from in-order traversal. 6. Explain the non-recursive tree traversal methods on binary search tree. 7. Describe in detail about Dijkstra s algorithm to find the shortest path on the graph. 8. a) What are the various applications of Sets? b) What is Abstract data type? Describe about ADT data structures and operations on stacks.

16 R10 SET - 4 II B. Tech I Semester, Supplementary Examinations, May a) Distinguish best, worst and average case complexities of an algorithm. b) Write a Fibonacci search algorithm Trace this algorithm by taking an example. 2. Write a merge sort algorithm derive the time complexity of it. 3. a) Give an algorithm for implementing stack operations. b) What are the various applications of Queue? 4. a) Write the algorithm for merging two singly linked lists. b) What are the advantages of double linked list over singly linked list? 5. a) Explain the representation of binary trees using linked lists. b) What are the differences between binary tree and complete binary tree? 6. Write an algorithm to perform creates, insert and delete operations on a binary search tree. 7. a) Explain Graph representation using Adjacency matrix. b) Explain minimum spanning tree using Prim s algorithm. 8. a) Describe about information storage using bit strings. b) Define abstraction explain about significance of ADT model.

17 R10 SET - 1 II B. Tech I Semester Regular Examinations, March a) Analyze the linear search algorithm with an example. b) With an example, explain how you will measure the efficiency of an algorithm. 2. Give an algorithm for quick sort and explain its time complexity. Trace the algorithm for the following data (15M) 3. a) Write an algorithm for converting infix expression to postfix expression. b) Explain the algorithm for evaluating postfix expression with suitable example 4. Discuss any three types of special matrices with their implementation. Write pseudo code for adding two sparse matrices. (15M) 5. a) Give step wise procedure for in-order and post-order traversal of Binary Tree. b) Draw an expression tree for the given infix expression: (a/(b*c/d+e/f*g)) (10M+5M) 6. a) What is in order threaded binary tree? Write an algorithm for preorder traversal of a in order threaded binary tree b) Explain how Binary search tree is different from Binary tree? Construes a BST from the given list 9, 3, 5, 27, 4, 13, 20, 39, 46, a) Explain the BFS technique in detail with an example. b) Describe various representation of graph. 8. How will you represent sets using linked lists? Describe its operations using linked lists. (15M) '' ' ' '' '' ''''

18 R10 SET - 2 II B. Tech I Semester Regular Examinations, March a) What are the parameters on which an algorithm can be analyzed? Describe each with an example. b) Discuss the recursive algorithm for tower s of Hanoi problem. 2. a) Explain how external sorting is different from internal sorting with an example? b) Explain merge sort with a suitable example. 3. a) Write an algorithm for converting infix expression to postfix expression with an example. b) Write an algorithm to insert and delete a key in a circular queue. 4. a) Doubly linked list takes more space than singly linked list for storing one extra address. Under what conditions could be a doubly linked list be more beneficial than singly linked list. b) Create a circular linked list using dynamic memory allocation and show its advantages over linear linked list. 5. a) What is a binary tree? Differentiate a binary tree from a binary search tree. b) Explain the process of displaying the nodes of a binary tree at a particular level. 6. a) Explain the process of finding the minimum and maximum elements of the binary search tree. b) Construct a Binary Search Tree from the given values. 45, 23, 29, 85, 92, 7, 11, 35, 49, a) Explain the Kruskal s algorithm to find the minimum cost spanning tree with an example. b) What is a digraph? Define in- degree and out-degree with respect to a digraph. (10M+5M) 8. a) What are sets? Discuss their operations. b) Write ADT for array implementation of a queue. (5M+10M) '' ' ' '' '' ''''

19 R10 SET - 3 II B. Tech I Semester Regular Examinations, March a) State various asymptotic relations used for denoting time complexity. b) Define algorithm? What is the criterion that every algorithm must satisfy? 2. Describe insertion sort algorithm and trace the steps of insertion sort for sorting the list- 12, 19, 33, 26, 29, 35, 22, 37. Find the total number of comparisons made. (15M) 3. a) Why is circular queue better than standard linear queue? Explain. b) Discuss the algorithms for push and pop operations on a stack 4. Write an algorithm to insert new node at the beginning, at middle position and at the end of a Singly Linked List. (15M) 5. How do you represent binary tree in a list? Write an algorithm for finding K th element and deleting an element. (15M) 6. What is a binary search tree? Write an algorithm for inserting and deleting a node in a binary search tree. (15M) 7. Write Dijkstra s algorithm to find the shortest path and explain. (15M) 8. Write ADT for array implementation of polynomial addition. (15M) '' ' ' '' '' ''''

20 R10 SET - 4 II B. Tech I Semester Regular Examinations, March a) Why recursive algorithms are inefficient? Analyze with the example of Fibonacci number. b) Explain time and space complexity related to algorithms and also state their importance 2. Define heap. Explain heap sort with an example. (15M) 3. a) Convert the given Infix expression to Postfix expression using Stack and show the details of Stack at each step of conversion. Expression: (a + b * c ^ d) * (e + f / g). Note : ^ indicates exponent operator. b) Mention the advantages in the array implementation of lists. (10M+5M) 4. a) Write the algorithm for interchanging the elements of position P and next(p) in a singly linked list. b) What are the advantages and disadvantages of circular linked lists? 5. Write algorithms to perform insert, delete operations on binary tree and explain them with an example each. (15M) 6. What is Binary Search Tree? Draw a binary search tree when following keys are inserted in order 5, 75, 19, 36, 8, 62, 49, 84, 12, 18, 25. How can a binary search tree be used for sorting of the keys? (15M) 7. Give the Prim s algorithm and explain its purpose with an example and analyze the algorithm. (15M) 8. a) What are bit strings? How information storage is done using bit strings. b) Give the applications of sets. (10M+5M) '' ' ' '' '' ''''

21 SET - 1 R10 II B.Tech I Semester, Regular Examinations, Nov Time: 3 hours Max. Marks: 75 All Questions carry equal marks 1. a) Define recursion? Explain about design methodology and implementation of recursive algorithms. b) Explain about Fibonacci search in detail. 2. a) Explain about insertion sort algorithm. b) What is sorting? Explain about radix sort with an example. 3. D L a) List out applications of Stack and Queue. b) Explain the Priority Queue implementations. Write necessary algorithms. R O 4. a) Design an algorithm to reverse the linked list. Trace your algorithm with an example. b) Write advantages and disadvantages of single linked list. 5. a) What is binary tree? Explain about representation of binary trees using arrays. b) Discuss about creation of binary tree from in-order and post order traversals. W U (6M+9M) 6. a) Write non recursive program to perform different stack operations. b) What is balanced binary tree and give need and applications of these in computer science. 7. a) Explain the prim s algorithm. Find out minimum spanning tree for the following graph: 8. T N J b) Write ADT routines for depth first search algorithm. a) How do you represent sets using linked lists? b) Define ADT. Explain in detail about ADT operations.

22 SET - 2 R10 II B.Tech I Semester, Regular Examinations, Nov Time: 3 hours Max. Marks: 75 All Questions carry equal marks 1. a) What is an algorithm? How do you analyze an algorithm? b) Explain about binary search and write algorithm. What is the prerequisite for binary search? 2. a) State and explain the algorithm to perform heap sort. b) Analyze the time complexity of Quick Sort algorithm. 3. R O b) Explain the ADT operations for array implementation of Stack. 4. D L a) Write algorithm for implementation of Queue. a) State and explain different operations on single linked list. b) Using linked lists, formulate separate routines to create an empty stack and to push an W U element on to a stack. 5. a) How do you create binary tree from pre order and in order traversals. T N b) Explain about representation of binary trees using linked lists. 6. J a) Explain Dijkstra s shortest path algorithm with an example. b) Write ADT routines for breath first search algorithm. 8. a) Write algorithm to locate an element in binary search tree. b) What are the different tree traversals? Explain with example. 7. a) Discuss in detail about the operations of sets using linked lists. b) Explain in detail ADT implementation of stack.

23 SET - 3 R10 II B.Tech I Semester, Regular Examinations, Nov Time: 3 hours Max. Marks: 75 All Questions carry equal marks a) Write a program to print Fibonacci sequence and explain. b) Derive the best, average, worst case time complexity of a linear search. a) Explain any one external sorting with example. D L b) Trace the Quick Sort algorithm for the following list of numbers: 90, 77, 60, 99, 55, 88, a) Write a program to reversing list using stack. R O b) Write about representation Queue using array. 4. a) Explain about merging two single linked lists into one list. Write an algorithm. W U b) Give advantages and disadvantages of circular and double linked lists. 5. T N J a) Explain binary search tree operations with an example. b) What is balanced binary tree? Explain with an example. 7. a) What is binary tree? Write a program for creation of binary tree. b) Write an algorithm for the deletion of a node from a binary tree. 6. a) Explain warshall 0073 algorithm. How do you find the minimum spanning tree for a tree? Explain with an example. b) Explain graph representation using linked list. 8. a) Explain detail about information storage using bit strings. b) Explain in detail ADT implementation of queue.

24 SET - 4 R10 II B.Tech I Semester, Regular Examinations, Nov Time: 3 hours Max. Marks: 75 All Questions carry equal marks 1. a) Explain about linear search with an example trace the algorithm. b) Write a program to solve towers of Hanoi and explain. 2. a) Develop an algorithm for binary search. Validate the algorithm with a suitable data set. b) Write and explain Quick Sort algorithm. What is its time complexity. 3. R O b) Explain infix to postfix conversion using stack with an example. 4. D L a) State and explain Queue operations using arrays. a) Write an algorithm to concatenate two singly linked lists. b) Write applications of single linked list to represent polynomial expressions. 5. W U a) Explain in detail in-order, preorder and post-order traversal of tree. b) A binary tree has 7 nodes. The pre-order and post-order traversals of the tree are given below. T N Draw the tree. Pre-order: GFDABEC 6. J Post-order: ABDCEFG a) What is threaded binary tree? Explain with an example. b) Write the applications of balanced binary tree in computer science. Explain in detail. 7. a) Explain Dijkstra s algorithm with an example. Does the algorithm work for paths of negative values? Explain. b) Explain graph representation using adjacency matrix. 8. a) Define set and discuss in detail about the representation of sets. Give applications of sets. b) What is abstraction? Explain in detail about ADT data structure.

25 R10 SET - 1 II B. Tech I Semester, Regular Examinations, Nov a) Derive the best, average and worst case time complexities of linear search algorithm. b) What is recursion? Comment on the efficiency of recursive procedures. 2. Compare the advantages and disadvantages of bubble, insertion and selection sort using the following list of numbers a) Explain the application of stack for conversion of infix to postfix. b) Explain the role of stack in function call with suitable example. 4. a) Compare singly and doubly linked list to perform insertion and deletion operations. b) Explain about application of single linked list to represent polynomial expressions 5. a) Explain the different methods to represent a binary tree and compare them. b) What is meant by tree traversal? Explain the different traversal techniques. 6. Give an algorithm for constructing a binary search tree. While constructing the tree, take care that duplicate values are not added. Trace the algorithm on 2,5, 9, 6, 12, 10, 13, 8 7. a) What is minimum spanning tree? Name any two algorithms used to find minimum spanning tree. Explain any one in detail. b) Explain the graph traversal methods with suitable examples. 8. a) Briefly explain the information storage using bit strings. b) Write ADT operations for array implementation of a queue.

26 R10 SET - 2 II B. Tech I Semester, Regular Examinations, Nov a) Give the recursive algorithm to calculate GCD of two numbers. b) Develop an algorithm for binary search. Validate the algorithm with a suitable data set. 2. a) What is sorting? Mention different types of sorting. b) Sort the following list using heap sort algorithm a) Find the equivalent prefix of : * / - b) What are the advantages of priority queue? Explain the implementation of Priority Queue. 4. a) Give an algorithm to reverse a singly linked circular list in place. b) What are the advantages and disadvantages of doubly linked list over singly linked list? Explain the applications of doubly linked lists. 5. Construct the binary tree given the following traversals: Pre-order: A B D G H C E I F In-order: G D H B A E I C F 6. a) Write an algorithm to perform deletion operation in Binary Search Tree. b) What is meant by threaded binary tree? Explain the impact of such a representation on the tree traversal procedure. 7. a) Define a graph. How is it differing from tree? Give examples. b) Write an algorithm to find the minimum cost spanning tree of an undirected weighted graph. 8. a) Briefly explain the operations of sets using linked lists. b) Write ADT operations for linked list implementation of a queue.

27 R10 SET - 3 II B. Tech I Semester, Regular Examinations, Nov a) When will you say an algorithm efficient? Give the notations for time complexity. b) Write an algorithm for recursive Fibonacci search. 2. Write a C program to sort the elements whose worst and average case are O(n log n ). 3. a) What is a stack? Give its advantages and disadvantages. b) Write a C program to illustrate Queue operations. 4. a) Why is linked list used for polynomial arithmetic? Explain the linked representations of polynomials in detail. b) Write a subroutine to concatenate two singly linked lists. 5. a) Write a procedure to swap nodes in a binary tree. b) List all possible non-similar binary trees having four nodes. 6. Construct a binary search tree for the following: i) 80, 40, 75, 30, 20, 90, 50 ii) 100, 50, 200, 25, 90, 80, a) Write and explain various graphs traversal algorithms with suitable examples. b) What is single source shortest path problem? Describe Dijikstra s single source shortest path algorithm with an example. 8. a) How sets are to be represented in computer memory? Explain each one with a suitable example. b) What is ADT? Give a model for Abstract Data type.

28 R10 SET - 4 II B. Tech I Semester, Regular Examinations, Nov a) Using linear search, delete the number 26 from the following list of numbers and give the steps b) What is recursion? How is it different from tail recursion. 2. Write C a program to sort the elements whose worst case complexity is O(n 2 ) and average case is O(n log n). 3. a) Write C a program to convert an infix expression into prefix expression. b) Transform the following expression to post fix expression using stacks. (a+b)*((d-e)+f) 4. Write an algorithm to perform the following operations in to linked list. i) Return sum of integers in the list ii) Return the length of the list 5. a) Give an iterative algorithm for the in order traversal of a binary tree. b) Is it possible to implement binary trees using linear arrays? If yes, explain how? 6. a) How does the height of a binary search tree affect its performance? Explain with an example. b) List the differences between binary tree and binary search tree. 7. a) How are graphs represented inside a computer s memory? Which method do you prefer and why? b) Draw a complete undirected graph having five nodes. 8. a) What are sets? How they are different from arrays? Give their applications. b) Write ADT operations for stacks using linked lists.

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

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

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

End-Term Examination Second Semester [MCA] MAY-JUNE 2006 (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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

& ( 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

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

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

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

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

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

( ) ( ) 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

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

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

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

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

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

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

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

Draw a diagram of an empty circular queue and describe it to the reader.

Draw a diagram of an empty circular queue and describe it to the reader. 1020_1030_testquestions.text Wed Sep 10 10:40:46 2014 1 1983/84 COSC1020/30 Tests >>> The following was given to students. >>> Students can have a good idea of test questions by examining and trying the

More information

CS302 Data Structures using C++

CS302 Data Structures using C++ CS302 Data Structures using C++ Study Guide for the Final Exam Fall 2018 Revision 1.1 This document serves to help you prepare towards the final exam for the Fall 2018 semester. 1. What topics are to be

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

1. Attempt any three of the following: 15

1. Attempt any three of the following: 15 (Time: 2½ hours) Total Marks: 75 N. B.: (1) All questions are compulsory. (2) Make suitable assumptions wherever necessary and state the assumptions made. (3) Answers to the same question must be written

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

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

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

( ) 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

) $ 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

DESIGN AND ANALYSIS OF ALGORITHMS

DESIGN AND ANALYSIS OF ALGORITHMS DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK Module 1 OBJECTIVE: Algorithms play the central role in both the science and the practice of computing. There are compelling reasons to study algorithms.

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

( ). 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

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

( ) 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

Bharati Vidyapeeth s College Of Engineering for Women Pune-43 Department E & TC. SE- Unit Test I Subject-DS

Bharati Vidyapeeth s College Of Engineering for Women Pune-43 Department E & TC. SE- Unit Test I Subject-DS Bharati Vidyapeeth s College Of Engineering for Women Pune-43 SE- Unit Test I Subject-DS Date: 25/02/2010 Q-1 a) What is sorting? State different types of sorting and write a function in C to implement

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

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

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

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

( 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

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

( ) 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

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

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

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK Degree & Branch : B.E E.C.E. Year & Semester : II / IV Section : ECE 1, 2 &

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

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

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION

CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION CLASS: II YEAR / IV SEMESTER CSE CS 6402-DESIGN AND ANALYSIS OF ALGORITHM UNIT I INTRODUCTION 1. What is performance measurement? 2. What is an algorithm? 3. How the algorithm is good? 4. What are the

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

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

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

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

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

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

DEPARTMENT OF COMPUTER APPLICATIONS B.C.A. - FIRST YEAR ( REGULATION) SECOND SEMESTER LESSON PLAN SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

DEPARTMENT OF COMPUTER APPLICATIONS B.C.A. - FIRST YEAR ( REGULATION) SECOND SEMESTER LESSON PLAN SRM INSTITUTE OF SCIENCE AND TECHNOLOGY DEPARTMENT OF COMPUTER APPLICATIONS B.C.A. - FIRST YEAR (2015-2016 REGULATION) SECOND SEMESTER LESSON PLAN SRM INSTITUTE OF SCIENCE AND TECHNOLOGY FACULTY OF SCIENCE AND HUMANITIES SRM NAGAR, KATTANKULATHUR

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

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

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

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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : I / II Section : CSE - 1 & 2 Subject Code : CS6202 Subject Name : Programming and Data Structures-I Degree & Branch : B.E C.S.E. 2 MARK

More information

Summer Final Exam Review Session August 5, 2009

Summer Final Exam Review Session August 5, 2009 15-111 Summer 2 2009 Final Exam Review Session August 5, 2009 Exam Notes The exam is from 10:30 to 1:30 PM in Wean Hall 5419A. The exam will be primarily conceptual. The major emphasis is on understanding

More information

LESSON PLAN B.C.A. - FIRST YEAR ( REGULATION) SECOND SEMESTER

LESSON PLAN B.C.A. - FIRST YEAR ( REGULATION) SECOND SEMESTER DEPARTMENT OF COMPUTER APPLICATIONS LESSON PLAN B.C.A. - FIRST YEAR (2014-2015 REGULATION) SECOND SEMESTER SRM UNIVERSITY FACULTY OF SCIENCE AND HUMANITIES SRM NAGAR, KATTANKULATHUR 603 203 SRM UNIVERSITY

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

CS 445: Data Structures Final Examination: Study Guide

CS 445: Data Structures Final Examination: Study Guide CS 445: Data Structures Final Examination: Study Guide Java prerequisites Classes, objects, and references Access modifiers Arguments and parameters Garbage collection Self-test questions: Appendix C Designing

More information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

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

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in themodel answer scheme. 2) The model answer and the answer written by candidate may

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

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

Overview of Data Structures, Algorithm Analysis

Overview of Data Structures, Algorithm Analysis SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : Advanced Data structures and Algorithms (16CS5804) Year & Sem: M.Tech

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

Data Structures Brett Bernstein

Data Structures Brett Bernstein Data Structures Brett Bernstein Final Review 1. Consider a binary tree of height k. (a) What is the maximum number of nodes? (b) What is the maximum number of leaves? (c) What is the minimum number of

More information

DATA STRUCTURE. 1- What data structure can be used to check if a syntax has balanced paranthesis? A - queue B - tree C - list D - stack

DATA STRUCTURE. 1- What data structure can be used to check if a syntax has balanced paranthesis? A - queue B - tree C - list D - stack DATA STRUCTURE 1- What data structure can be used to check if a syntax has balanced paranthesis? A - queue B - tree C - list D - stack Answer : D Explanation Stack uses LIFO method which is good for checking

More information