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

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

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

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

VALLIAMMAI ENGINEERING COLLEGE

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

Department of Computer Science and Technology

INSTITUTE OF AERONAUTICAL ENGINEERING

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

17CS33:Data Structures Using C QUESTION BANK

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

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

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

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.

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

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

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

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

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

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

PESIT Bangalore South Campus Department of MCA Course Information for

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

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

Sample Question Paper

MLR Institute of Technology

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

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

CS301 - Data Structures Glossary By

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

CS DATA STRUCTURES AND ALGORITHMS

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

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

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

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

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

CS8391-DATA STRUCTURES

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

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

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

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

CS 8391 DATA STRUCTURES

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

Data Structures Question Bank Multiple Choice

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

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

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

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

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

CS302 Data Structures using C++

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

1. Attempt any three of the following: 15

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

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

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

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

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

DESIGN AND ANALYSIS OF ALGORITHMS

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

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

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

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

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

12 Abstract Data Types

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

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

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

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

DATA STRUCTURES AND ALGORITHMS

( ) 1 B. 1. Suppose f x

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

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

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

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

Course Review for Finals. Cpt S 223 Fall 2008

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

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

DATA STRUCTURES THROUGH C++

CS521 \ Notes for the Final Exam

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

DS ata Structures Aptitude

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

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

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

Fundamentals of Data Structure

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

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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

Summer Final Exam Review Session August 5, 2009

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

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

CS 445: Data Structures Final Examination: Study Guide

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

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

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

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

Adapted By Manik Hosen

Overview of Data Structures, Algorithm Analysis

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

Data Structures Brett Bernstein

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

Transcription:

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

www.jwjobs.net Code No-: R21051 R10 SET - 1 6. 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

www.jwjobs.net Code No-: R21051 R10 SET - 2 II B. Tech I Semester, Supplementary Examinations, May - 2012 (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, 25 2. 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

www.jwjobs.net Code No-: R21051 R10 SET - 2 5. 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 0. 7. 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

www.jwjobs.net Code No-: R21051 R10 SET - 3 II B. Tech I Semester, Supplementary Examinations, May - 2012 (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

www.jwjobs.net Code No-: R21051 R10 SET - 3 7. 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}. 0 1 8 1 4 1 0 12 4 9 W = 8 12 0 7 3 1 4 7 0 2 4 9 3 2 0 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

www.jwjobs.net Code No-: R21051 R10 SET - 4 II B. Tech I Semester, Supplementary Examinations, May - 2012 (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

www.jwjobs.net Code No-: R21051 R10 SET - 4 5. 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 61 52 14 17 40 43 ii 2 3 50 40 60 43 iii 10 65 31 48 37 43 iv 81 61 52 14 41 43 v 17 77 27 66 18 43 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

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 1 II B. Tech I Semester Supplementary Examinations Dec 2013 1. 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 3 13 7 26 44 23 98 57 (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 14 23 7 10 33 56 80 66 70 7. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 2 II B. Tech I Semester Supplementary Examinations Dec 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 3 II B. Tech I Semester Supplementary Examinations Dec 2013 1. 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 7 10 14 23 33 56 66 70 80 7. 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)

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 4 II B. Tech I Semester Supplementary Examinations Dec 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 2 II B. Tech I Semester, Supplementary Examinations, May 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 3 II B. Tech I Semester, Supplementary Examinations, May 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 4 II B. Tech I Semester, Supplementary Examinations, May 2013 1. 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.

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 1 II B. Tech I Semester Regular Examinations, March - 2014 1. 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. 65 70 75 80 85 60 55 50 45 (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, 17 7. 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) '' ' ' '' '' ''''

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 2 II B. Tech I Semester Regular Examinations, March - 2014 1. 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, 51 7. 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) '' ' ' '' '' ''''

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 3 II B. Tech I Semester Regular Examinations, March - 2014 1. 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) '' ' ' '' '' ''''

www.android.jntuworld.com www.jwjobs.net www.android.jwjobs.net www.jwjobs.net R10 SET - 4 II B. Tech I Semester Regular Examinations, March - 2014 1. 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) '' ' ' '' '' ''''

SET - 1 R10 II B.Tech I Semester, Regular Examinations, Nov - 2011 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.

SET - 2 R10 II B.Tech I Semester, Regular Examinations, Nov - 2011 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.

SET - 3 R10 II B.Tech I Semester, Regular Examinations, Nov - 2011 Time: 3 hours Max. Marks: 75 All Questions carry equal marks 1. 2. 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, 66. 3. 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.

SET - 4 R10 II B.Tech I Semester, Regular Examinations, Nov - 2011 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.

www.android.jntuworld.com www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Regular Examinations, Nov 2012 1. 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. 23 56 14 34 58 97 72 3. 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.

www.android.jntuworld.com www.jwjobs.net R10 SET - 2 II B. Tech I Semester, Regular Examinations, Nov 2012 1. 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. 35 45 25 11 6 85 17 35 3. a) Find the equivalent prefix of : 7 5 2 + * 4 1 5 - / - 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.

www.android.jntuworld.com www.jwjobs.net R10 SET - 3 II B. Tech I Semester, Regular Examinations, Nov 2012 1. 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, 150 7. 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.

www.android.jntuworld.com www.jwjobs.net R10 SET - 4 II B. Tech I Semester, Regular Examinations, Nov 2012 1. a) Using linear search, delete the number 26 from the following list of numbers and give the steps. 10 6 3 7 17 26 56 32 87 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.