Jawaharlal Nehru Engineering College
|
|
- Dominick Watson
- 5 years ago
- Views:
Transcription
1 Jawaharlal Nehru Engineering College Laboratory Manual DATA STRUCTURES For Second Year Students (Information Technology) ISO registered Prof. S. A. Dongre ( IT, Dept.) Author JNEC, Aurangabad
2 FORWARD It is my great pleasure to present this laboratory manual for Second year engineering students for the subject of Data Structures keeping in view the vast coverage required for visualization of concepts of Data Communication with simple language. As a student, many of you may be wondering with some of the questions in your mind regarding the subject and exactly what has been tried is to answer through this manual. As you may be aware that MGM has already been awarded with ISO 9000 certification and it is our endurance to technically equip our students taking the advantage of the procedural aspects of ISO 9000 Certification. Faculty members are also advised that covering these aspects in initial stage itself, will greatly relived them in future as much of the load will be taken care by the enthusiasm energies of the students once they are conceptually clear. Dr. S. D. Deshmukh Principal
3 Vision of JNEC College seeks to be the engineering college of choice in Maharashtra that can provide the best learning experience, the most productive learning community, and the most creative learning environment in Engineering Education and will be recognized as one of the best Engineering Colleges in India. Mission of JNEC To develop innovative engineers with human values, well equipped to solve complex technical problems, address the needs of modern society and pursue lifelong learning, by providing them competent, caring and committed faculty. IT Vision: IT department is committed to ensure the quality education to students by providing innovative resources & continuous up-gradation of the department. To achieve Heights of Excellence in the world we strive to organize regular interaction with Industry and Alumni. IT Mission: To impart core technical competency & knowledge in students through curriculum and certification programs to fulfill the industry requirements which ultimately benefits society at large. Program Educational Objectives: I. Preparation: To prepare students to excel in PG program or to succeed in Industry /Technical profession through global, rigorous education. II. Core Competence: To provide students with a solid foundation in mathematical, scientific and engineering fundamentals required to solve engineering problems and also to pursue higher studies. III. Breadth: To train students with good scientific and engineering breadth so as to comprehend, analyze, design and create novel product and solution for the real life problems. IV. Professionalism: To inculcate in students professional and ethical attitude, effective communication skills, team work skills, multi-disciplinary approach and an ability to relate engineering issues to broader social context. V. Learning Environment: To provide students with academic environment aware of excellence, leadership, written ethical codes and guidelines and lifelong learning needed for successful professional career.
4 LABORATORY MANUAL CONTENTS This manual is intended for the Second year students of IT & CSE branches in the subject of Data Structures. This manual typically contains practical/lab Sessions related Data Structures covering various aspects related the subject to enhanced understanding. We have made the efforts to cover various aspects of the subject covering computer hardware components, software components networking aspects, Operating System concepts and programming aspects will be complete in itself to make it meaningful, elaborative understandable concepts and conceptual visualization. Students are advised to thoroughly go though this manual rather than only topics mentioned in the syllabus as practical aspects are the key to understanding and conceptual visualization of theoretical aspects covered in the books. Good Luck for your Enjoyable Laboratory Sessions. Ms.S.A.Dongre
5 SUBJECT INDEX 1. Lab Exercises 1: Program for implementing Stacks using static array. 2. Lab Exercises 2: Program for implementing Stacks using Dynamic array. 3. Lab Exercises 3: Program for implementing Circular Queue. 4. Lab Exercises 4: Program for Evaluation of postfix expression. 5. Lab Exercises 5: Program for implementing Singly Linked list 6. Lab Exercises 6: Program for implementing Doubly Linked List. 7. Lab Exercises 7: Program for creation of Maxheap. 8. Lab Exercises 8: Program for creation of Binary Search Tree. 9. Lab Exercises 9: Program for Binary Search to search an element in the given sequence. 10. Quiz on the subject 11. Conduction of Viva-Voce Examinations 12. Submission 13. Evaluation and marking system
6 DOs and DON Ts in Laboratory: 1. Do not handle any equipment before reading the instructions/instruction manuals 2. Read carefully the power ratings of the equipment before it is switched on whether ratings 230 V/50 Hz or 115V/60 Hz. For Indian equipments, the power ratings are normally 230V/50Hz. If you have equipment with 115/60 Hz ratings, do not insert power plug, as our normal supply is 230V/50 Hz, which will damage the equipment. 3. Observe type of sockets of equipment power to avoid mechanical damage 4. Do not forcefully place connectors to avoid the damage 5. Strictly observe the instructions given by the teacher/lab Instructor Instructions for Laboratory Teachers: 1. Submission related to whatever lab work has been completed should be done during the next lab session. The immediate arrangements for printouts related to submission on the day of practical assignments. 2. Students should be taught for taking the printouts under the observation of lab teacher. 3. The promptness of submission should be encouraged by way of marking and evaluation patterns that will benefit the sincere students.
7 1. Lab Exercises: Exercise No 1: (2 Hours) 1 Practical 1.1 Program for implementing stack using static array Review: 1. A collection of data and its relationship among the elements forms a data structure. 2. A stack is ordered collection of items in which all insertion, deletion are done at the same end called the top. 3. The basic operations on stack are push and pop. It is often called LIFO data structure. 1.2 Operations on Stack: Algorithm to push an element: 1. Check whether stack is full or not. (i.e. if(top==maxsize)) 2. Otherwise increase the top by 1(else top=top+1) 3. Insert the element, elem. stack[top]=elem; Algorithm to pop an element: 1. Check whether stack is empty or not (if (top==-1)) 2. Otherwise decrement top by To check whether the stack is empty or not (STACK EMPTY) To check whether the stack is full or not (STACK FULL). 1.3 Declaration of Stack: Int top=-1; Int Stack[MAXSIZE];/*MAXSIZE is maximum size of stack*/
8 Example: 2. Lab Exercises: Exercise No 2: (2 Hours) 1 Practical 2.1 Program for implementing singly linked list and doubly linked list 1.4 Conclusion: Thus we implement the stack using static array.
9 2. Lab Exercises: Exercise No 2: (2 Hours) 1 Practical 2.1 Program for implementing stack using Dynamic memory allocation. Review: 1. A collection of data and its relationship among the elements forms a data structure. 2. A stack is ordered collection of items in which all insertion, deletion are done at the same end called the top. 3. The basic operations on stack are push and pop. It is often called LIFO data structure. 4. Static memory allocation may insert in wastage of memory and also shortage of memory. (Like in array implementations) 5. To outcome these problems, dynamic memory allocation is used. 2.2 Operations on Stack: Algorithm to push an element: 1. Check whether stack is full or not. (i.e. if(top==n)) 2. Otherwise increase the top by 1(else top=top+1) 3. Insert the element, elem. stack[top]=elem; Algorithm to pop an element: 1. Check whether stack is empty or not (if (top==-1)) 2. Otherwise decrement top by To check whether the stack is empty or not (STACK EMPTY) To check whether the stack is full or not (STACK FULL). 2.3 Declaration of Stack: Typedef struct { Int key; /* other field*/ } element ; Element *stack; MALLOC(stack, sizeof(*stack)); Int top=-1; 2.4 Conclusion: Thus we implement the stack using dynamic memory allocation.
10 3. Lab Exercises: Exercise No 3: (2 Hours) 1 Practical 3.1 Program for implementing circular queue Review: 1. A Queue is a non-primitive linear data structure. It is ordered collection of element in which elements are added at one end called rear and elements are deleted at other end called front. 2. The basic operations on Queue are insert and delete. It is called as FIFO data structure. 3. A circular queue is implemented by visualizing the 1D array as circular queue. The circular queue overcomes the problems associated when the deletion is made from the front, it gives queue full condition even if in reality, it is empty. 3.2Operation on Circular Queue: 3.2.1Algorithm for insertion of an item into circular queue: 1. Initialize front=-1,rear=0 and MAXSIZE=10 2. if(front==(rear+1)%maxsize) Print Queue Overflow and return Else 3. if(front==-1) Set front=rear=0,else Rear=((rear+1)%MAXSIZE) Queue[rear]=item 3.2.2Algorithm for deletion of an item from circular queue: 1. if(front==-1) Print Queue underflow and return Else Item=queue[front] 2. if(front==rear) Assign front=-1 rear=-1 Else Front=((front+1)%MAXSIZE)
11 Example: 3.4 Conclusion: Thus we implement the circular queue
12 4 Lab Exercises: Exercise No 4: (2 Hours) 1 Practical 4.1 Program for Evaluation of postfix expression Review: 1. Stack can be used for evaluation of a postfix expression 2. Here we will use the stack for storing operand rather than operators 3. Each operator in a postfix expression refers to a previous two operands in the expression.(out of these two operands one may be the result of applying a previous operator) operands are taken as numeric value. 4.2 Algorithm for evaluation of postfix expression: 1. Read the postfix expression from left to right. 2. If the input symbol read is an operand then push it onto stack 3. If the operator is read, pop top two operands and perform arithmetic operation.if operator is + result=operand 1 + operand 2 - result=operand 1 - operand 2 * result= operand1 * operand 2 / result = operand1 / operand 2 $ result = operand1 $ operand Example: For infix expression =(3+5)*(7-6) its post fix expression =35+76-* Evaluation of Postfix expression: Step1: Assume the array contains the input. Array * Read the element of array, one by one, if it is operand push it onto stack. Stack Array * 5 Top 3 reading
13 Step2: If the operator is read, pop two operands Perform op1 + op2 5 3 Op2 Op1 Result = = 8 push 8 Step 3: push next element into stack Top * Again pop two operand and perform the operation Perform op1 op2 Result=7-6=1 Push the result onto the stack 1 8 Top
14 Step4: * 1 8 Again pop Two operand and perform the operation 8 Perform op1 *op2 Result=8*1=8 Push the result onto stack. Result=8 At this point input is null,therefore stop the evaluation procedure and remove the value from the stack i.e. the final result=8 4.4 Conclusion: Thus we evaluate the postfix expression using stack.
15 5. Lab Exercises: Exercise No 5: (2 Hours) 1 Practical 5.1 Program for implementing singly linked list Review 1. Static memory allocation may insert in wastage of memory and also shortage of memory. (Like in array implementations) 2. To outcome these problems, dynamic memory allocation is used. 3. Linked list is a linear data structure which consists of number of nodes created dynamically. 4. A linked list has no fix size but grows or shrinks as elements are added or deleted from the list. 5. A singly linked list is a dynamic data structure. It may grow or shrink. Growing or shrinking depends on operation made. 6. Every node of list has two fields, information and next address. Next address field contains memory address location of next node. 5.2 Operations on Singly Linked List: Algorithm for inserting a node at the beginning 1. Allocate memory for the new node, temp=malloc(). 2. Assign the value of the data field of the new node, temp->info 3. Make the link field of the new node to point to the starting node of the linked list, temp->next=start. 4. Then, set the external pointer (which was pointing to the starting node) to point to the new node, start=temp Algorithm for inserting a node at the end 1. If the list is empty then create the new node, temp=malloc (). 2. If the list is not empty, then go to the last node and then insert the new node after the last node, r=start; go till last node then r->next=temp Algorithm for inserting node at the specified position 1. Allocate memory for the new node, temp=malloc (). 2. Assign value to the data field of the new node, temp->info. 3. Go till node R, also mark next node as S. 4. Make the next field of node temp to node S and next field of node R to point to new node.
16 5.2.4 Algorithm for deleting the first node 1. Mark the first node as temp. 2. Then, make start point to the next node. 3. Make next field of temp, null. 4. Free temp Algorithm for deleting the last node 1. Mark the last node as temp & last but one node as R. 2. Make the next field of R as NULL. 3. Free temp Algorithm for deleting a middle node 1. Mark the node to be deleted as temp. 2. Mark the previous node as R & next nodes as S. 3. Make the next field of R to point S. 4. Make the next field of temp, NULL. 5. Free Temp. 5.3Declaration of linked list in C: struct node { Int info; struct node *next; }; If we see the declaration of a node for a linked list, the first variable is for storing information. The second variable is a struct variable, next address field which stores address location. It actually contains a complete node. start Info next Fig. Structure of a node
17 5.4 Example: 5.5 Conclusion: Thus we study and implement singly linked list.
18 6. Lab Exercises: Exercise No 6: (2 Hours) 1 Practical 6.1 Program for implementing Doubly linked list Review: 1. Although c circular linked list has advantageous over a linear list, it still has several drawbacks. 2. One cannot traverse such a list backward, not a node be deleted from a circular linked list, given only a pointer to that node. 3. In cases, where these facilities are required, the appropriate data structure is a Doubly linked list. Each node in such a list contain contains two pointer, one to its predecessor and another to its successor. 6.2 operations on Doubly Linked List Algorithm to insert a node: 1. Allocate memory for new node, temp. 2. If this is first node, start=temp. 3. If temp is to be inserted after last node, mark last node as R. Make R->next=temp & temp->prev=r. 4. If this node is to be inserted at the starting of the list Start->prev=temp Temp->next=start Start=temp. 5. Otherwise, if the node is to be inserted after the specific node mark that node as R & next node as S. R->next=temp Temp->next=S S->prev=temp Temp->prev=R Algorithm to delete a node 1. Mark node to be deleted, temp. 2. If this is first node, then make start point to next node (start=start->next) Make next field of temp NULL (temp->next=null) & free(temp).
19 3. If this is last node, mark the last but one node as R. Make the next field of R, NULL &prev field of temp NULL, R->next=NULL Temp->prev=NULL Free(temp) 4. If this is some middle node, mark the previous node as R & next node as S, then make, R->next=S S->prev=R Temp->next=NULL Temp->prev=NULL Free(temp) 6.3 Declaration of node for Doubly linked list: PREV INFO NEXT Struct node { Int info; Struct node *next,*prev; } 6.4 Example: 6.5 Conclusion: Thus we study and implement Doubly linked list
20 7. Lab Exercises: Exercise No 7: (2 Hours) 1 Practical 7.1 Program for creation of Maxheap Review: 1. A max heap is complete binary tree that is also a max tree. 2. From the definition, it follows that the key in the root of max tree is the largest than the key values in its children 7.2 For example: operation on Maxheap Insertion : - A maxheap is a 5 element shown in fig.1 when an element is added to this heap, the resulting six elements heap must have the structure, because a heap is a complete binart tree. - To correct the place for the element that is being inserted, we use a bubbling up process that begins at the new node of tree and move towards the root. The element to be inserted bubbles up as far as necessary to ensure a max heap following the insertion. - If the element to be inserted has key value 1, it may be inserted asa left chile of 2. If inserted the key value of the new element is 5, then this cannot be inserted as left child of 2. So, the 2 is move down to its left child and we determine if placing the 5 at old position of 2 results in a maxheap. - Since the parent (20) is atleast as large as the element being inserted (5), it is all right to insert the new element at the position shown in fig
21 - Suppose that the new element has value 21 rather than 5 here, two moves down to its left child the 21 cannot be inserted into the old position occupied by 2, as the parent of this position is smaller than 21. Hence the 20 is move down to it,s right child and 21 inserted into the root of the heap (a) (b) ( c) ( d ) 7.4 Conclusion: hence we have create a max heap
22 8. Lab Exercises: Exercise No 8: (2 Hours) 1 Practical 8.1 Program for traversal of Binary search Tree Review: 1. Trees are non linear data structures that can be used to represent data items processing hierarchical relationship between them. 2. Binary search tree may be used to store ordered information which can reduce search time for any particular element. 3. Trees can be traversed in inorder, preorder and postorder. 4. Inorder traversal of binary search tree will result in elements arranged in ascending order. 5. Binary trees can be used to evaluate mathematical expressions 8.2 Algorithm for creation of binary tree and inserting an element 1. Read an element, make it root node. 2. Read next element, elm, compare it with the root node, if it is less then insert it in left else insert right. 3. Repeat step 2 till you insert all elements. 8.3 Traversal Methods: Algorithm for Preorder Traversal 1. Visit the node. 2. Traverse the left sub-tree in preorder. 3. Traverse the right sub-tree in preorder. Example:
23 8.3.2 Algorithm for Inorder Traversal 1. Traverse the left sub-tree in inorder. 2. Visit the node. 3. Traverse the right sub-tree in inorder. Example: Algorithm for Postorder Traversal 1. Traverse the left sub-tree in postorder. 2. Traverse the right sub-tree in postorder. 3. Visit the node. Example: 8.4 Conclusion: Thus we have traverse a binary search tree.
24 9. Lab Exercises: Exercise No 9: (2 Hours) 1 Practical 9.1 Program for Binary Search to search an element in the given sequence 1. Enter the sorted numbers, n and key. 2. Set low=0, high=n-1 3. Mid=low+high/2 4. If (key == a [mid]) return mid as position of element found. 5. If(key<a[mid]) search for key in a[low] to a[mid-1] 6. If(key>a[mid]) search for key in a[mid+1] to a[high]. 9.2 Example: 9.3 Conclusion: Thus we have search a element in a given sequence
25 10. Quiz on the subject: Quiz should be conducted on tips in the laboratory, recent trends and subject knowledge of the subject. The quiz questions should be formulated such that questions are normally is from the scope outside of the books. However twisted questions and self formulated questions by the faculty can be asked but correctness of it is necessarily to be thoroughly checked before the conduction of the quiz. 11. Conduction of Viva-Voce Examinations: Teacher should conduct oral exams of the students with full preparation. Normally, the objective questions with guess are to be avoided. To make it meaningful, the questions should be such that depth of the students in the subject is tested Oral examinations are to be conducted in co-cordial environment amongst the teachers taking the examination. Teachers taking such examinations should not have ill thoughts about each other and courtesies should be offered to each other in case of difference of opinion, which should be critically suppressed in front of the students.
26 12. Submission: Document Standard: A] Page Size A4 Size B] Running text Justified text C] Spacing 1 Line D] Page Layout and Margins (Dimensions in Cms) Normal Page Horizontal Description Font Size Boldness Italics Underline Capitalize College Name Arial Yes Document Title Tahoma Document Subject Century Gothic Capital Class Bookman old Style Document No Bookman old Style Copy write inf Bookman old Style Forward heading Bookman old Yes Capital Style Forward matter Bookman old Style Lab man Contents Bookman old Yes Capital title Style Index title Bookman old 12 Yes Yes Capital Style Index contents Bookman old
27 Style Heading Tahoma 14 Yes Yes Yes Running Matter Comic Sans MS Evaluation and marking system: Basic honesty in the evaluation and marking system is absolutely essential and in the process impartial nature of the evaluator is required in the examination system to become popular amongst the students. It is a wrong approach or concept to award the students by way of easy marking to get cheap popularity among the students to which they do not deserve. It is a primary responsibility of the teacher that right students who are really putting up lot of hard work with right kind of intelligence are correctly awarded. The marking patterns should be justifiable to the students without any ambiguity and teacher should see that students are faced with unjust circumstances.
Jawaharlal Nehru Engineering College
Jawaharlal Nehru Engineering College Laboratory Manual Operating System For Third Year Students CSE Dept: Computer Science & Engineering (NBA Accredited) Author JNEC, Aurangabad 1 FOREWORD It is my great
More informationJawaharlal Nehru Engineering College
Jawaharlal Nehru Engineering College Laboratory Manual DATA STRUCTURES USING C For Second year Students (CSE) 16, Nov 2005 Rev 00 Comp Sc ISO 9000 Tech Document Author JNEC, Aurangabad FOREWORD It is my
More informationDHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai
DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai 601 301 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING III SEMESTER - R 2017 CS8381 DATA STRUCTURES LABORATORY LABORATORY MANUAL Name Register No Section
More informationMGM s Jawaharlal Nehru Engineering College
MGM s Jawaharlal Nehru Engineering College Laboratory Manual Python Programming For Third Year Students Dept: Master of Computer Application FOREWORD It is my great pleasure to present this laboratory
More informationMULTIMEDIA 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 informationThe time and space are the two measure for efficiency of an algorithm.
There are basically six operations: 5. Sorting: Arranging the elements of list in an order (either ascending or descending). 6. Merging: combining the two list into one list. Algorithm: The time and space
More informationDHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
DHANALAKSHMI COLLEGE OF ENGINEERING Tambaram, Chennai 601 301 DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC8381 - FUNDAMENTALS OF DATA STRUCTURES IN C III SEMESTER - R 2017 LABORATORY MANUAL
More informationMAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)
WINTER 18 EXAMINATION Subject Name: Data Structure using C Model wer Subject Code: 22317 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given
More informationCS301 - 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 informationFORTH 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 informationFORTH 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 informationa) 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 informationObjective 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 informationINSTITUTE 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 information1 P age DS & OOPS / UNIT II
UNIT II Stacks: Definition operations - applications of stack. Queues: Definition - operations Priority queues - De que Applications of queue. Linked List: Singly Linked List, Doubly Linked List, Circular
More information12 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 informationMAHARASHTRA 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 informationSyllabus 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 informationDATA 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 informationData 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 informationMID 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 informationPrepared 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 informationEC8393FUNDAMENTALS 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 informationMIDTERM EXAMINATION Spring 2010 CS301- Data Structures
MIDTERM EXAMINATION Spring 2010 CS301- Data Structures Question No: 1 Which one of the following statement is NOT correct. In linked list the elements are necessarily to be contiguous In linked list the
More informationData 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 informationFirst 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 informationR10 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 informationMAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)
WINTER 17 EXAMINATION Subject Name: Data Structure Using C Model Answer Subject Code: 17330 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as
More informationCS8391-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 informationSchool of Engineering & Computational Sciences
Catalog: Undergraduate Catalog 2014-2015 [Archived Catalog] Title: School of Engineering and Computational Sciences School of Engineering & Computational Sciences Administration David Donahoo, B.S., M.S.
More informationAnswers. 1. (A) Attempt any five : 20 Marks
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 informationOperations on Heap Tree The major operations required to be performed on a heap tree are Insertion, Deletion, and Merging.
Priority Queue, Heap and Heap Sort In this time, we will study Priority queue, heap and heap sort. Heap is a data structure, which permits one to insert elements into a set and also to find the largest
More informationStacks, Queues and Hierarchical Collections
Programming III Stacks, Queues and Hierarchical Collections 2501ICT Nathan Contents Linked Data Structures Revisited Stacks Queues Trees Binary Trees Generic Trees Implementations 2 Copyright 2002- by
More informationCpt S 122 Data Structures. Course Review Midterm Exam # 1
Cpt S 122 Data Structures Course Review Midterm Exam # 1 Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Midterm Exam 1 When: Friday (09/28) 12:10-1pm Where:
More informationSummer 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 informationUniversity of Palestine. Final Exam 2 nd semester 2014/2015 Total Grade: 50
First Question Q1 B1 Choose the best Answer: No. of Branches (1) (10/50) 1) 2) 3) 4) Suppose we start with an empty stack and then perform the following operations: Push (A); Push (B); Pop; Push (C); Top;
More informationDEEPIKA KAMBOJ UNIT 2. What is Stack?
What is Stack? UNIT 2 Stack is an important data structure which stores its elements in an ordered manner. You must have seen a pile of plates where one plate is placed on top of another. Now, when you
More informationCurriculum Scheme. Dr. Ambedkar Institute of Technology, Bengaluru-56 (An Autonomous Institute, Affiliated to V T U, Belagavi)
Curriculum Scheme INSTITUTION VISION & MISSION VISION: To create Dynamic, Resourceful, Adept and Innovative Technical professionals to meet global challenges. MISSION: To offer state of the art undergraduate,
More informationJawaharlal Nehru Engineering College
Jawaharlal Nehru Engineering College Laboratory Manual Mobile Computing For Final Year Students Lab Manual Made By Ms. A. R. Salunke Author JNEC, Aurangabad FOREWORD It is my great pleasure to present
More information3. Fundamental Data Structures
3. Fundamental Data Structures CH08-320201: Algorithms and Data Structures 233 Data Structures Definition (recall): A data structure is a way to store and organize data in order to facilitate access and
More informationMAHARASHTRA 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 informationData Structures. Outline. Introduction Linked Lists Stacks Queues Trees Deitel & Associates, Inc. All rights reserved.
Data Structures Outline Introduction Linked Lists Stacks Queues Trees Introduction dynamic data structures - grow and shrink during execution Linked lists - insertions and removals made anywhere Stacks
More informationCP2 Revision. theme: dynamic datatypes & data structures
CP2 Revision theme: dynamic datatypes & data structures structs can hold any combination of datatypes handled as single entity struct { }; ;
More informationMLR 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 informationINSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 COMPUTER SCIENCE AND ENGINEERING COURSE DESCRIPTION FORM Course Title Course Code Regulation Course Structure Course Coordinator
More informationStacks, Queues and Hierarchical Collections. 2501ICT Logan
Stacks, Queues and Hierarchical Collections 2501ICT Logan Contents Linked Data Structures Revisited Stacks Queues Trees Binary Trees Generic Trees Implementations 2 Queues and Stacks Queues and Stacks
More informationDepartment 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 informationEnd-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 informationE.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 informationCSCE 2014 Final Exam Spring Version A
CSCE 2014 Final Exam Spring 2017 Version A Student Name: Student UAID: Instructions: This is a two-hour exam. Students are allowed one 8.5 by 11 page of study notes. Calculators, cell phones and computers
More informationTREES. Trees - Introduction
TREES Chapter 6 Trees - Introduction All previous data organizations we've studied are linear each element can have only one predecessor and successor Accessing all elements in a linear sequence is O(n)
More informationLargest Online Community of VU Students
WWW.VUPages.com http://forum.vupages.com WWW.VUTUBE.EDU.PK Largest Online Community of VU Students MIDTERM EXAMINATION SEMESTER FALL 2003 CS301-DATA STRUCTURE Total Marks:86 Duration: 60min Instructions
More informationCS8391-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 informationSt. MARTIN s ENGINERING COLLEGE Dhulapally,Secunderabad
St. MARTIN s ENGINERING COLLEGE Dhulapally,Secunderabad-500014 INFORMATION TECHNOLOGY COURSE DESCRIPTION FORM Course Title Data Structures Course Code A30502 Regulation R13-JNTUH Course Structure Lectures
More informationCOURSE OBJECTIVES. Name of the Program : B.Tech Year: II Section: A, B & C. Course/Subject : MATLAB/ LABVIEW LAB Course Code: GR11A2020
Academic Year : 201-2014 COURSE OBJECTIVES Semester : I Name of the Program : B.Tech Year: II Section: A, B & C Course/Subject : MATLAB/ LABVIEW LAB Course Code: GR11A2020 Name of the Faculty : K.Sireesha,Assistant
More informationChapter 20: Binary Trees
Chapter 20: Binary Trees 20.1 Definition and Application of Binary Trees Definition and Application of Binary Trees Binary tree: a nonlinear linked list in which each node may point to 0, 1, or two other
More informationFundamentals 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 informationAlgorithms and Data Structures
Algorithms and Data Structures PD Dr. rer. nat. habil. Ralf Peter Mundani Computation in Engineering / BGU Scientific Computing in Computer Science / INF Summer Term 2018 Part 2: Data Structures PD Dr.
More informationSample 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 informationCourse 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 informationFINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard
FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should Use better data structures
More information[ DATA STRUCTURES ] Fig. (1) : A Tree
[ DATA STRUCTURES ] Chapter - 07 : Trees A Tree is a non-linear data structure in which items are arranged in a sorted sequence. It is used to represent hierarchical relationship existing amongst several
More informationCE 221 Data Structures and Algorithms
CE 221 Data Structures and Algorithms Chapter 4: Trees (Binary) Text: Read Weiss, 4.1 4.2 Izmir University of Economics 1 Preliminaries - I (Recursive) Definition: A tree is a collection of nodes. The
More informationData Structures and Algorithms Notes
Data Structures and Algorithms Notes Notes by Winst Course taught by Dr. G. R. Baliga 256-400 ext. 3890 baliga@rowan.edu Course started: September 4, 2012 Last generated: December 18, 2013 Interfaces -
More informationAbstract Data Structures IB Computer Science. Content developed by Dartford Grammar School Computer Science Department
Abstract Data Structures IB Computer Science Content developed by Dartford Grammar School Computer Science Department HL Topics 1-7, D1-4 1: System design 2: Computer Organisation 3: Networks 4: Computational
More informationBinary Trees. Height 1
Binary Trees Definitions A tree is a finite set of one or more nodes that shows parent-child relationship such that There is a special node called root Remaining nodes are portioned into subsets T1,T2,T3.
More informationR10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May
www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Which of the given options provides the
More informationComputer Science Foundation Exam. Dec. 19, 2003 COMPUTER SCIENCE I. Section I A. No Calculators! KEY
Computer Science Foundation Exam Dec. 19, 2003 COMPUTER SCIENCE I Section I A No Calculators! Name: KEY SSN: Score: 50 In this section of the exam, there are Three (3) problems You must do all of them.
More informationR13. 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 informationData Structure using C++ Lecture 04. Data Structures and algorithm analysis in C++ Chapter , 3.2, 3.2.1
Data Structure using C++ Lecture 04 Reading Material Data Structures and algorithm analysis in C++ Chapter. 3 3.1, 3.2, 3.2.1 Summary Infix to Postfix Example 1: Infix to Postfix Example 2: Postfix Evaluation
More informationPart A: Course Outline
University of Macau Faculty of Science and Technology Course Title: Department of Electrical and Computer Engineering Part A: Course Outline Communication System and Data Network Course Code: ELEC460 Year
More informationComputer Science E-22 Practice Final Exam
name Computer Science E-22 This exam consists of three parts. Part I has 10 multiple-choice questions that you must complete. Part II consists of 4 multi-part problems, of which you must complete 3, and
More information6-TREE. Tree: Directed Tree: A directed tree is an acyclic digraph which has one node called the root node
6-TREE Data Structure Management (330701) Tree: A tree is defined as a finite set of one or more nodes such that There is a special node called the root node R. The remaining nodes are divided into n 0
More informationSection I. 1 Review of user defined function,recursion, pointer, structure 05 2 Introduction to Data Structures and stack
6 Course Title Course Code Data Structures CE307 Theory :03 Course Credit Practical :01 Tutorial :00 Credits :04 Course Learning Outcomes On the completion of the course, students will be able to : Understand
More informationBinary Trees
Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what
More informationPESIT 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 informationCSE 230 Intermediate Programming in C and C++
CSE 230 Intermediate Programming in C and C++ Structures and List Processing Fall 2017 Stony Brook University Instructor: Shebuti Rayana http://www3.cs.stonybrook.edu/~cse230/ Self-referential Structure
More informationBinary Search Tree Binary Search tree is a binary tree in which each internal node x stores an element such that the element stored in the left subtree of x are less than or equal to x and elements stored
More information& ( 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 informationComputer Science 1 Study Union Practice Problems. What are the arguments to malloc? calloc? realloc? What do they do?
Study Union Review Jacob Cornett 1 Computer Science 1 Study Union Practice Problems!This may not be a comprehensive review of everything that will be on your exam and we may go over more during the session.
More informationLinked List. April 2, 2007 Programming and Data Structure 1
Linked List April 2, 2007 Programming and Data Structure 1 Introduction head A linked list is a data structure which can change during execution. Successive elements are connected by pointers. Last element
More informationCS 270 Algorithms. Oliver Kullmann. Binary search. Lists. Background: Pointers. Trees. Implementing rooted trees. Tutorial
Week 7 General remarks Arrays, lists, pointers and 1 2 3 We conclude elementary data structures by discussing and implementing arrays, lists, and trees. Background information on pointers is provided (for
More informationData Structure (CS301)
WWW.VUPages.com http://forum.vupages.com WWW.VUTUBE.EDU.PK Largest Online Community of VU Students Virtual University Government of Pakistan Midterm Examination Spring 2003 Data Structure (CS301) StudentID/LoginID
More informationAshish Gupta, Data JUET, Guna
Categories of data structures Data structures are categories in two classes 1. Linear data structure: - organized into sequential fashion - elements are attached one after another - easy to implement because
More informationCRITERIA FOR ACCREDITING COMPUTING PROGRAMS
CRITERIA FOR ACCREDITING COMPUTING PROGRAMS Effective for Reviews During the 2014-2015 Accreditation Cycle Incorporates all changes approved by the ABET Board of Directors as of October 26, 2013 Computing
More informationAdapted 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 informationContent: Learning Objectives
1 BLOOM PUBLIC CHOOL Vasant Kunj, New Delhi Lesson Plan Class: XII ubject: Computer cience Month : July No of s: 21 Chapter:Data structure: Linked List TTT: 8 WT: 12 Content: Learning Objectives At the
More informationTopic Binary Trees (Non-Linear Data Structures)
Topic Binary Trees (Non-Linear Data Structures) CIS210 1 Linear Data Structures Arrays Linked lists Skip lists Self-organizing lists CIS210 2 Non-Linear Data Structures Hierarchical representation? Trees
More informationDATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND ALGORITHMS For COMPUTER SCIENCE DATA STRUCTURES &. ALGORITHMS SYLLABUS Programming and Data Structures: Programming in C. Recursion. Arrays, stacks, queues, linked lists, trees, binary
More informationDraw 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 informationAP Computer Science AB
AP Computer Science AB Dr. Tyler Krebs Voice Mail: 431-8938 Classroom: B128 Office: TV Studio Characteristics We Value in This Classroom: 1. Respect. (Show respect for everyone and everything.) 2. Integrity.
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial : 1PT_CS_A+C_Programming & Data Structure_230918 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 011-45124612 CLASS TEST 2018-19
More informationDC54 DATA STRUCTURES DEC 2014
Q.2 a. Write a function that computes x^y using Recursion. The property that x^y is simply a product of x and x^(y-1 ). For example, 5^4= 5 * 5^3. The recursive definition of x^y can be represented as
More informationCSE 373 Spring Midterm. Friday April 21st
CSE 373 Spring 2006 Data Structures and Algorithms Midterm Friday April 21st NAME : Do all your work on these pages. Do not add any pages. Use back pages if necessary. Show your work to get partial credit.
More informationBinary Trees and Binary Search Trees
Binary Trees and Binary Search Trees Learning Goals After this unit, you should be able to... Determine if a given tree is an instance of a particular type (e.g. binary, and later heap, etc.) Describe
More informationSolution: The examples of stack application are reverse a string, post fix evaluation, infix to postfix conversion.
1. What is the full form of LIFO? The full form of LIFO is Last In First Out. 2. Give some examples for stack application. The examples of stack application are reverse a string, post fix evaluation, infix
More informationPostfix (and prefix) notation
Postfix (and prefix) notation Also called reverse Polish reversed form of notation devised by mathematician named Jan Łukasiewicz (so really lü-kä-sha-vech notation) Infix notation is: operand operator
More informationTree. Virendra Singh Indian Institute of Science Bangalore Lecture 11. Courtesy: Prof. Sartaj Sahni. Sep 3,2010
SE-286: Data Structures t and Programming Tree Virendra Singh Indian Institute of Science Bangalore Lecture 11 Courtesy: Prof. Sartaj Sahni 1 Trees Nature Lover sviewofatree leaves branches root 3 Computer
More informationComputer Science 210 Data Structures Siena College Fall Topic Notes: Trees
Computer Science 0 Data Structures Siena College Fall 08 Topic Notes: Trees We ve spent a lot of time looking at a variety of structures where there is a natural linear ordering of the elements in arrays,
More informationData Structures. Trees. By Dr. Mohammad Ali H. Eljinini. M.A. Eljinini, PhD
Data Structures Trees By Dr. Mohammad Ali H. Eljinini Trees Are collections of items arranged in a tree like data structure (none linear). Items are stored inside units called nodes. However: We can use
More information