A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

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

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

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

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

CS301 - Data Structures Glossary By

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

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.

1. Attempt any three of the following: 15

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

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

Data Structures Question Bank Multiple Choice

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

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

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

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

CS8391-DATA STRUCTURES

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

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

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

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

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

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

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Department of Computer Science and Technology

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

Code No: R Set No. 1

Course Review for Finals. Cpt S 223 Fall 2008

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

CS 8391 DATA STRUCTURES

Data Structures Through C. Student Workbook

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

DS ata Structures Aptitude

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

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions.

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

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

Direct Addressing Hash table: Collision resolution how handle collisions Hash Functions:

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

DATA STRUCTURES AND ALGORITHMS

Bioinformatics Programming. EE, NCKU Tien-Hao Chang (Darby Chang)

March 20/2003 Jayakanth Srinivasan,

DATA STRUCTURES THROUGH C++

Course Review. Cpt S 223 Fall 2009

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

Question Bank Subject: Advanced Data Structures Class: SE Computer

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

CSE 332 Spring 2013: Midterm Exam (closed book, closed notes, no calculators)

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

CSE 332 Autumn 2013: Midterm Exam (closed book, closed notes, no calculators)

Analysis of Algorithms

12 Abstract Data Types


CPSC 331 Term Test #2 March 26, 2007

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

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Course Review. Cpt S 223 Fall 2010

Data Structures Brett Bernstein

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

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?

DATA STRUCTURES AND ALGORITHMS

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

CSE Data Structures and Introduction to Algorithms... In Java! Instructor: Fei Wang. Mid-Term Exam. CSE2100 DS & Algorithms 1

Final Examination CSE 100 UCSD (Practice)

Reg. No. : Question Paper Code : 27157

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

TREES. Trees - Introduction

Sample Question Paper

Data Structures in C++ Using the Standard Template Library

Section 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents

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

Midterm solutions. n f 3 (n) = 3

Summer Final Exam Review Session August 5, 2009

CS DATA STRUCTURES AND ALGORITHMS

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

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

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

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

Trees. (Trees) Data Structures and Programming Spring / 28

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

Trees! Ellen Walker! CPSC 201 Data Structures! Hiram College!

CLO Assessment CLO1 Q1(10) CLO2 Q2 (10) CLO3 Q4 (10) CLO4 Q3a (4)

Binary Trees, Binary Search Trees

BRONX COMMUNITY COLLEGE of the City University of New York DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE. Sample Final Exam

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

Cpt S 223 Fall Cpt S 223. School of EECS, WSU

Overview of Data Structures, Algorithm Analysis

CSE 332 Spring 2014: Midterm Exam (closed book, closed notes, no calculators)

Section Summary. Introduction to Trees Rooted Trees Trees as Models Properties of Trees

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

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

CS 112 Final May 8, 2008 (Lightly edited for 2012 Practice) Name: BU ID: Instructions

1. Two main measures for the efficiency of an algorithm are a. Processor and memory b. Complexity and capacity c. Time and space d.

Frequently asked Data Structures Interview Questions

CSCE 210/2201 Data Structures and Algorithms. Prof. Amr Goneid

Draw the resulting binary search tree. Be sure to show intermediate steps for partial credit (in case your final tree is incorrect).

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

CSCE 210/2201 Data Structures and Algorithms. Prof. Amr Goneid. Fall 2018

Transcription:

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 ANSWER SHEET only, attached to the question paper, as per the instructions contained therein. PART ONE is NOT to be answered in the answer book. 3. Maximum time allotted for PART ONE is ONE HOUR. Answer book for PART TWO will be supplied at the table when the answer sheet for PART ONE is returned. However, candidates, who complete PART ONE earlier than one hour, can collect the answer book for PART TWO immediately after handing over the answer sheet for PART ONE. TOTAL TIME: 3 HOURS TOTAL MARKS: 100 (PART ONE 40; PART TWO 60) PART ONE (Answer all the questions) 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) 1.1 p is a pointer to the structure. A member mem of that structure is referenced by A) *p.mem B) (*p).mem C) *(p.mem) 1.2 Which one is not correct? A) Pointers are used for dynamically allocating memory. B) Dynamic memory allocation is preferred when storage requirement is not predictable. C) Data access in dynamically allocated storage is faster than static allocated storage. 1.3 Which of the following cannot be performed recursively? A) Binary Search B) Quick Sort C) Depth First Search 1.4 Which of the following types of expression does not require precedence rules for evaluation? A) Fully parenthesized infix expression B) Original Prefix expression C) Partially parenthesized infix expression 1.5 In a binary tree, the number of terminal or leaf nodes is 10. The number of nodes with two children is: A) 9 B) 11 C) 15 D) 12 A6-R3 Page 1 of 5 July, 2008

1.6 Which of the following is a hash function? A) Quadratic Probing B) Chaining C) Open addressing D) Folding 1.7 If the inorder and preorder traversal of a binary tree are D, B, F, E, G, H, A, C and A, B, D, E, F, G, H, C respectively then, the postorder traversal of that tree is : A) D, F, G, A, B, C, H, E B) F, H, D, G, E, B, C, A C) C, G, H, F, E D, B, A D) D, F, H, G, E, B, C, A 1.8 Which of the following is not correct? A) f(n) = O (f(n)) B) c*f(n) = O (f(n)) for a constant c C) O (f(n) + g (n)) = f(n) + O (g (n)) D) O (f(n) 2 ) = O (f(n)) 2 1.9 Given 2 sorted lists of size m and n respectively. The number of comparisons needed in the worst case by merge sort will be A) Min (m, n) B) m*n C) m + n 1 D) Max ( m, n) 1.10 A B-tree of order m is an m-way tree in which all internal nodes except the root have at most now empty children A) m-1 B) m C) m 2 D) m 2 A6-R3 Page 2 of 5 July, 2008

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the tear-off sheet attached to the question paper, following instructions therein. (1 x 10) 2.1 Introducing interfaces can help to eliminate dependences. 2.2 Sequence diagram is a tool used to depict the sequence and variation of screens. 2.3 De-referencing operator * has the same effect when it is applied to a pointer, a structure or a union. 2.4 In an empty threaded binary tree the right link of the head is a thread to itself. 2.5 Array is linear data structure. 2.6 Insertion in and deletion from an array does not involve physical movement of elements of the arrays. 2.7 The adjacency matrix corresponding to a graph consisting of n nodes but no edges is a unit matrix. 2.8 Recursion cannot be removed without using a stack. 2.9 If an AVL tree has n items then its height is log n. 2.10The average sequential successful search time for a sequential file having n records is (n+1)/2. 3. Match words and phrases in column X with the closest related meaning/ word(s)/phrase(s) in column Y. Enter your selection in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) X 3.1 Circular list A. Data structure for backtracking 3.2 Pointer B. Height Balanced Trees 3.3 Forest C. Static Tree Table 3.4 Tree D. Collision Resolution 3.5 Pendant vertex E. Most sparse AVL Tree 3.6 AVL Trees F. Dynamic Environment 3.7 Rehashing G. Pattern Matching 3.8 Fibonacci Tree H. Shell Sort 3.9 Finite Automata I. Used in Sparse Matrix 3.10 Divide and Conquer J. Ordered set of ordered trees K. Merge Sort L. Dynamic Data Structure Y M. A Vertex with degree 1 A6-R3 Page 3 of 5 July, 2008

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Enter your choice in the tear-off answer sheet attached to the question paper, following instructions therein. (1 x 10) A. Log 2 n B. Floor (log 2 (n) +1) C. Floor ( log 2 (n + 1)) D. n-1 E. N F. Faster G. Slower H. Less than I. More than J. 3 K. 2 L. Queue M. Stack N. Many - to - many O. One-to-many P. Storage Structure Q. Non recursive R. recursive 4.1 Time complexity of inserting an element in a heap of n elements is of the order of. 4.2 Best fit approach is generally than first fit approach for memory allocation. 4.3 Representation of data structure in memory is known as. 4.4 A graph represents relationship between nodes. 4.5 The depth of a complete binary tree with n nodes is. 4.6 A tree is a cycle free undirected graph with n vertices and edges. 4.7 Space required to store an adjancy matrix is that to store the adjancy list of a dense graph. 4.8 Number of positions where the second largest elements of a heap may be stored is. 4.9 Conversion of infix arithmetic expression to postfix expression requires the use of. 4.10 The minimum number of edges in a connected cyclic graph of n vertices is. A6-R3 Page 4 of 5 July, 2008

PART TWO (Answer any FOUR questions) 5. a) If A(n) = a m n m + a m 1 n m -1 + -------------- + a 1 n + a 0 is a polynomial of degree n, then show that A(n) = O (n m ), where O stands for big oh notation. b) Write a C function to add two polynomials using arrays. 6. a) Consider a linked list with a pointer pointing to its head. Write a C function to insert a node to the front of the list, after the last node, in between the list. b) Write a C function to copy one stack to another assuming the stack is implemented using linked list. 7. a) Write a C function to count the number of nodes in a binary tree. b) What do you mean by height balanced binary search tree? Write the steps for converting a general binary search tree into a height balanced tree. c) Prove that a binary tree with n internal nodes has (n+1) external nodes. (5+5+5) 8. a) Create a B-tree of order 5, when the keys arrive in the following order a, f, g, b, k, d, m, j, e, s, i, x, r, y, c b) Create a binary search tree when the elements arrive in the following order 10, 5, 20, 7, 29, 11, 23, 29, 13, 12 c) What do you mean by threaded binary tree? Give an example. (8+5+2) 9. a) What do you mean by a spanning tree? Create a minimal spanning tree for the following: 15 16 18 10 20 12 17 20 25 b) Write a C function for bubble sort. Hence, giving intermediate lists, sort the following: 11, 10, 12, 8 A6-R3 Page 5 of 5 July, 2008