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

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

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

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

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

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

VALLIAMMAI ENGINEERING COLLEGE

Department of Computer Science and Technology

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

INSTITUTE OF AERONAUTICAL ENGINEERING

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

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

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

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

17CS33:Data Structures Using C QUESTION BANK

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

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

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.

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

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

MLR Institute of Technology

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

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

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

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

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

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

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

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

PESIT Bangalore South Campus Department of MCA Course Information for

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

DATA STRUCTURES THROUGH C++

CS 8391 DATA STRUCTURES

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

CS8391-DATA STRUCTURES

Sample Question Paper

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

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

CS302 Data Structures using C++

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

Data Structures Question Bank Multiple Choice

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

12 Abstract Data Types

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

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

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

CS DATA STRUCTURES AND ALGORITHMS

Chapter 4 Trees. Theorem A graph G has a spanning tree if and only if G is connected.

Question Paper Code : 97044

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

CS301 - Data Structures Glossary By

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

1. Attempt any three of the following: 15

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

Friday, March 30. Last time we were talking about traversal of a rooted ordered tree, having defined preorder traversal. We will continue from there.

Course Review for Finals. Cpt S 223 Fall 2008

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

DESIGN AND ANALYSIS OF ALGORITHMS

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

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

CS 445: Data Structures Final Examination: Study Guide

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

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

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

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

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

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

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

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

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

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

DS ata Structures Aptitude

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

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

Algorithm Class. C C++ DS JAVA DATA STRUCTURES TRAINING INSTITUTE KPHB HYDERABAD. Mobile:

Course Review for. Cpt S 223 Fall Cpt S 223. School of EECS, WSU

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

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

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

CS521 \ Notes for the Final Exam

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

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

Data Structure Advanced

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

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

Data Structures Brett Bernstein

Data Structure and Algorithm, Spring 2013 Midterm Examination 120 points Time: 2:20pm-5:20pm (180 minutes), Tuesday, April 16, 2013

Analysis of Algorithms

Stacks, Queues and Hierarchical Collections

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

I Year MCA I Semester L T P To C FOUNDATIONS OF INFORMATION TECHNOLOGY

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

Course Review. Cpt S 223 Fall 2009

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

DC104 DATA STRUCTURE JUNE Q.2 a. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

March 20/2003 Jayakanth Srinivasan,

Reg. No. : Question Paper Code : 27157

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

Transcription:

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) Justify, which is most efficient from Single linked list, Double Linked List and Circular Linked List? d) Explain the concept of Level order Binary tree traversal? e) Explain about Threaded Binary Tree? f) What do you mean by Minimum Spanning Tree explain? PART B 2. a) Explain the difference between Linear Search and Binary Search? b) Using recursion, write an Algorithm for GCD Computation? 3. a) How to represent Queue using Array, Explain? b) Write Recursive Algorithms for Pre-order, In-order and Post-order traversals? Explain. 4. a) Briefly explain the advantages and disadvantages of Single and Double Linked List? b) Explain the mechanism of Deleting an element from front, rare and any of the Single Linked List? 5. a) Write an Algorithm to implement Binary tree using Arrays? b) Write a function to find an element and its position in a Binary Tree? 6. a) Give non -Recursive inorder tree traversal algorithm? b) How Balanced Binary Trees are used in Computer Application. Explain? 7. a) Explain about Warshall's Algorithm? b) Write an Algorithm for Depth First Search Traversals? *****

II B. Tech I Semester Regular Examinations, Dec - 2015 SET - 1 1. a) Write the algorithm for bubble sorting? (4M) b) What is meant by enqueue and dequeue operations? (3M) c) What are the steps to insert a new item between two values in a linked list? (3M) d) Explain Array representation of Binary tree? (4M) e) Explain Balanced Binary search tree? (4M) f) What is Graph? Give Adjacency list representation of graph? (4M) PART B 2. a) Explain Towers of Hanoi problem with example? Write a recursive algorithm? (10M) b) Explain Binary search operation? Write an algorithm? (6M) 3. a) Explain representation of Infix, prefix and postfix notations? Give its need? (6M) b) Explain Infix to postfix transformation? Convert the Infix expression (a+b) * c/d (10M) + (e+f) to postfix expression: 4. a) What is Linked List? Explain its representation? (8M) b) Explain the representation of polynomial expression using single linked list? (8M) 5. Construct the binary tree from the following: Pre-order: 1, 2, 4, 8, 9, 10, 11, 5, 3, 6, 7 In-order: 8, 4, 10, 9, 11, 2, 5, 1, 6, 3, 7 Find Post order traversal? 6. a) Explain the operations on Binary search trees? (8M) b) Explain the Threaded binary trees? (8M) 7. Explain Dijkstra s Single source shortest path problem? Find the shortest path form Vertex 0 using Dijkstra s algorithm? '' ''' '' ' '''' 1 of 1

II B. Tech I Semester Regular Examinations, Dec - 2015 SET - 2 1. a) Write an algorithm for selection sorting? (4M) b) What is meant by PUSH and POP on Stack? (4M) What is State of the STACK After insert 12, 75, 04, 100, 23, POP, POP, Insert 11, POP? c) Give the Advantages and Disadvantages of single linked lists? (3M) d) What is Binary tree? List the properties of Binary tree? (3M) e) Explain the application of Binary search trees? (4M) f) Explain about Minimum cost spanning tree? (4M) PART -B 2. a) What is meant by recursion? Write a recursive algorithm to generate Fibonacci (8M) sequence? b) Explain about Fibonacci search? Give an example? (8M) 3. Explain about Circular Queues implementation? Write the pseudo code for the operations on Circular Queues? 4. Explain different cased of insertion and deletion operations on single linked lists? Write the pseudo code for the same? 5. Explain about Inorder, Preorder and Postorder traversals? Perform Inorder, Preorder and postorder for the given binary tree 6. a) Explain the properties of Binary search tree? Construct Binary search tree for the (8M) following elements: 47, 12, 75, 88, 90, 73, 57, 1, 85, 50, 62 b) Explain the Threaded binary trees? (8M) 7. What is Graph? Explain two representation methods of graph? Brief Insertion and deletion of vertices and edges to the graph? '' ''' '' ' '''' 1 of 1

II B. Tech I Semester Regular Examinations, Dec - 2015 SET - 3 1. a) Write a recursive algorithm to compute GCD? (4M) b) Explain any application of the Queue? (4M) c) What are the steps to insert a new item at the head of a linked list? (3M) d) Explain insertion operation on Binary tree? (4M) e) What is threaded binary tree? Draw an example for it? (3M) f) Explain the Edge and vertex insertion operation on the Graph? (4M) PART B 2. a) Explain and Write an algorithm for Merge Sorting? (8M) b) Sort the elements using Merge Sort: (8M) 52, 38, 81, 22, 48, 13, 69, 93, 14, 45, 58, 79, 72 3. What is Stack? Explain the implementation of stacks using linked lists? Write the pseudo code for PUSH and POP operations on the Stack? 4. Explain and write pseudo code for creation, insertion and deletion operations on circular linked list? 5. What is Binary tree? Differentiate from the trees? Briefly Explain the Array representation of the binary tree? Give an example? 6. a) Write the algorithm for insertion and deletion of binary search trees? (8M) b) Write the non recursive algorithm using stack for the Preorder traversal of a (8M) binary tree 7. What is Minimum Spanning Tree? Explain Prim s algorithm and trace with an example? 1 of 1 '' ''' '' ' ''''

II B. Tech I Semester Regular Examinations, Dec - 2015 SET - 4 1. a) Write a recursive algorithm for factorial of a given number? (3M) b) Write the pseudo code for reversing the List using Stacks? (4M) c) What are the steps to insert a new item at the Tail of a linked list? (3M) d) Explain operations on binary trees? (4M) e) Draw the binary search tree for the following: 40, 67, 71, 33, 91, 56, 22, 32 (4M) f) What is Graph? Define degree of vertex? (4M) PART B 2. a) Explain and Write an algorithm for Quick Sorting? (8M) b) Sort the elements using Quick Sort: (8M) 52, 38, 81, 22, 48, 13, 69, 93, 14, 45, 58, 79, 72 3. What is priority Queue? Explain the implementation of Priority queue? Write an algorithm for operations on Priority queues? 4. What is Double linked list? Describe creation and operations of Double linked list? 5. What is Binary tree? Differentiate from the trees? Explain the Linked list representation of the binary tree? Give an example? 6. a) Explain the Insertion and deletion operations on the Binary Search Tree? (8M) b) Explain the properties and applications of binary search trees? (8M) 7. Write an algorithm for BFS and DFS? Trace with an example? 1 of 1 '' ''' '' ' ''''

SET - 1 II B. Tech I Semester Supplementary Examinations, June - 2015 1 a) Differentiate between time complexity and space complexity 3 M b) Give the analysis of Heap Sort Algorithm 4 M c) Describe any one method for representing sparse matrix. 4 M d) What are the advantages of Threaded Binary Tree 4M e) Draw a binary tree with five nodes and three leaves. 3M f) State the situation at which binary search algorithm is best applied. 4 M PART -B 2 a) Explain Divide and Conquer algorithmic strategy using Merge Sort as an example. b) Explain Towers of Hanoi problem with illustrative diagrams. 3 a) "Queues can be implemented using two stacks" - Support this statement with suitable programming example. b) Write an algorithm to convert infix expression into a postfix expression. Illustrate the same with the given infix expression: ( ( a + b ) / d - ( ( e - f ) + g ) 4 a) Explain how linked list can be used for representing polynomials using a suitable example. b) Write an algorithm to implement queue using linked list. 1 of 2

SET - 1 5 a) Write a recursive procedure which finds the depth D of a binary tree T. b) Explain various methods in which a binary tree can be represented. Discuss their advantages and disadvantages. 6 a) With the help of diagrams construct a Binary Search Tree (BST) with the following keys: 86, 12, 42, 69, 38, 57, 74, 6, 49, 71. Also delete 42 from the constructed BST. b) Write a short note on the non-recursive tree traversals using stack. 7 a) What are different ways of representing a graph? Explain using suitable example. b) Define the following terms with respect of a graph: i) Degree of vertex ii) Incident edge iii) Directed edge iv) Path, 2 of 2

SET - 2 II B. Tech I Semester Supplementary Examinations, June - 2015 1 a) List out the pros and cons of recursion. 4 M b) Write an algorithm to insert an element into circular queue. 3 M c) What is the running time of Quick sort and why. 4 M d) State how recursion is different from iteration? 3 M e) List out the properties of Binary Search Tree 4 M f) With respect to the graph below (a) Is it cyclic? (b) Is it connected? 4 M PART -B 2 a) Define an algorithm. Describe commonly used asymptotic notations and give their significance. b) Write an algorithm to implement Binary Search technique. Use the algorithm to search 32 in the following list of elements. Explain the process at each step. 12, 16, 17, 19, 20, 22, 24, 29, 30, 32, 37 3 a) What is a stack? Explain overheads caused by stack in recursion with a suitable example. b) Write the algorithm for evaluating a postfix expression using stack. Evaluate the following postfix notation 5 6 2 + * 8 4 / - 4 a) What is linked list? Write an algorithm for inserting an element E at the given position P of the linked list. b) What is a sparse matrix? Write an algorithm for finding the transpose of a sparse matrix. 1 of 2

SET - 2 5 a) What is a binary tree? Construct a binary tree given the pre-order traversal and in-order traversals as follows: Pre-Order Traversal: G B Q A C K F P D E R H In-Order Traversal: QB K C F A G P E D H R b) Define the following terms with suitable examples i. Binary Tree ii. Strictly Binary Tree iii. Complete Binary Tree iv. Almost Complete Binary Tree 6 a) Write a procedure to search an element in a Binary Search Tree. b) Write a short note on various operations of the threaded binary tree. 7 a) Write an algorithm to traverse the graph using Breadth First Search with a suitable example? b) What is Adjacency Matrix? Draw the Adjacency Matrix of the following graph. Also give adjacency list representation for the same. A B C D 2 of 2

SET - 3 II B. Tech I Semester Supplementary Examinations, June - 2015 1 a) What is an algorithm? List out the properties of an algorithm. 4 M b) Differentiate POP with PEEP operation of a stack. 3 M c) List out the advantages and disadvantages of using linked list over an array 4 M d) Write an algorithm to count the number of nodes in a circularly linked list. 4 M e) Draw the BST for the given list of elements 46, 21, 56, 89, 9, 12. 4 M f) Draw an undirected graph from the given adjacency matrix. 1 0 1 1 1 0 0 0 1 PART -B 2 a) Write a recursive function to find factorial of a given number. b) Explain radix sort with an algorithm. Discuss on its time complexity. 3 M 3 a) List out the applications of stack. Consider the usual algorithm for determining whether a sequence of parentheses is balanced. What is the maximum number of parentheses that will appear on the stack AT ANY ONE TIME when the algorithm analyzes: ( ( ) ( ( ) ) ( ( ) ) )? b) Explain various operations that are performed on queue with suitable algorithms. 4 a) Write algorithms for swapping two successive elements in a singly linked list with the first element placed at position P. b) What is a circular linked list? Write an algorithm to merge two circular linked lists. 1 of 2

SET - 3 5 a) Consider the following tree. 1 2 3 4 5 6 7 8 9 10 11 i. How many leaves does it have? ii. How many of the nodes have at least one sibling? iii. List out the nodes that are siblings to node 5? iv. How many descendants does the root have? v. What is the depth of the tree? vi. How many children does the root have? vii. "Is it a complete binary tree" - Justify b) Write the iterative procedures for i. Post-Order Traversal of a binary tree ii. Level-Order Traversal of a binary tree 6 a) Define threaded binary tree. Explain inorder threading using suitable example. Discuss advantages of the threaded binary tree. b) Write a procedure to find the maximum and minimum elements of a Binary Search Tree (BST). 7 a) Write the Prim s algorithm for finding the minimum-spanning tree of a graph with an example. b) What is transitive closure of a graph. Explain Warshall s algorithm to find the transitive closure of the graph with a suitable example 2 of 2

SET - 4 II B. Tech I Semester Supplementary Examinations, June - 2015 1 a) List out some examples for linear and non-linear data structures. 3 M b) Write the differences between stack and queue. 3 M c) What is singly linked list? Mention any two advantages of singly linked lists. 4 M d) State the scenario under which insertion sort should be used. 4 M e) Define threaded binary tree with an example. 4 M f) Does the minimal spanning tree of a graph give the shortest distance between any two specified nodes? Justify your answer. PART -B 2 a) Arrange the list of elements in ascending order using quick sort 45, 26, 31, 55, 77, 24, 42, 63, 99, 22, 88, 72? Write the value of left pointer l, right pointer r and pivot at each step and also draw the current scenario after each step? b) Write a recursive procedure to compute the n th Fibonacci number. 4 M 3 a) "One of the applications of stack is Reversing a List" Explain it with a suitable algorithm. b) List out various applications of queues. Explain how queue is used in Round Robin Algorithm with neat diagrams wherever necessary? 4 a) Discuss the advantages and disadvantages of representing a group of items as an array versus a linear linked list. b) Write an algorithm to insert a node at the end of a doubly linked list. 1 of 2

SET - 4 5 a) Find the inorder, preorder and postorder traversals for the given binary tree. b) Write a procedure to display the nodes of a binary tree at a particular level. 6 a) Give the analysis of insertion and deletion operations of nodes in binary search tree. b) Write a short note on Balanced Binary Trees. Also discuss on the applications of Balanced Binary Trees. 10 M 6 M 7 a) Differentiate between the DFS and BFS graph traversal techniques. b) What are connected components of a graph? Is there a method to find out all the connected components of a graph? Explain. 2 of 2