PES Institute of TechnologyBSC QUESTION BANK


 Nicholas Harvey
 1 years ago
 Views:
Transcription
1 PES Institute of TechnologyBSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions of a data type.write an ADT for a natural number 2. What is time complexity? Determine the time complexity of an iterative and recursive functions that adds n elements of the array using tabular method 3. Define three asymptotic notations and give the asymptotic representation of function 3n+2 in all the three notations and prove the same from first principle method 4. Define Big Oh notation. Show that 3n+2 = O(n) is correct Explain performance analysis and performance measurement. Write recursive function to implement Binary search 7. Write an recursive function to sum a list of numbers and also show the total step 7 counts for the function. What is recursion? What are various types of recursion? 4 9. What is recursion? Explain types of recursion. Write a C program to search an element in a given array using recursive binary search.. What do you understand by dynamic memory allocation? Explain any three functions that support dynamic allocation? 11. What is an algorithm? Briefly explain the criteria that an algorithm must satisfy. 12. Define a pointer. Write a C function to swap two numbers using pointers What is a pointer and why is it used? 14. Define Pointer. With example explain pointer declaration and accessing data through pointers 15. What are the various memory allocation techniques? Explain how memory can 5 be dynamically allocated using malloc()? 1. Explain the functions supported by C to caary out dynamic memory allocation Differentiate between static memory allocation and dynamic memory allocation. Explain malloc() and realloc(). 1. What are preprocessor directives? Explain any two operations that can be done using preprocessor directives 19. Bring out the differences between structures and unions. 5 UNIT II ARRAYS AND STRUCTURES 20. What is a structure? What are the different ways of declaring a structure? Explain with an example 21. Differentiate between Structure and Union with example 5
2 22. Incorporate a structure to contain details of a human being (name, age, salary 4 and date of birth) with date of birth containing month, day and year. 23. Write a C program with an appropriate structure definition and variable 12 declaration to store information about an employee, using nested structures. Consider the following fields like: ENAME, EMPID, DOJ(Date, Month, Year), Salary(Basic, DA, HRA) What are structures? Explain how the structures are useful by giving various 2+4 examples. 25. What is the difference between int *a and int a[5] and int *[5]? 2. What is sparse matrix? Give ADT sparse matrix and show with a suitable example sparse matrix representation storing as triples. 27. Write a C program to read a sparse matrix of integer values and search this matrix for an element specified by the user. 2. What is a polynomial? What is the degree of the polynomial? Write a function to add two polynomials? 29. How would you represent two sparse polynomials using array of structure and also write a function to add that polynomials and store the result in the same array. 30. What is the degree of the polynomial? Consider the two polynomials A(x) = x and B(x)= x 3 + 3x Show diagrammatically how these two polynomials can be represented in a array. 31. Write ADT for Polynomial. What are different ways of representing a polynomial? Write a program to read, display and add two polynomials 32. What is a sparse matrix? Write a program to search an element in a given sparse matrix. UNIT III STACKS AND QUEUES 33. Define stack. What are the different operations that can be performed on stack? Write a C program to implement all stack operations 34. Explain System stack in detail Write a note on multiple stacks 5 3. Explain how the stack is used in parameter passing Write short notes on dynamic stack representation 5 3. Show the stack after each operation of the following sequence that starts with the empty stack: push(a), push(b), pop, push(c), push(d), pop 39. Define Stack as a data structure and discuss its applications 40. List applications of stacks. Using stack write an algorithm to determine if a given string is palindrome and print suitable message as output. 41. Obtain prefix and postfix expression a. (A+B)*(C+D)$(A+B) b. A+B*CD/E*H c. (A+B^C^D)*(E+F/D) 42. List the various ways of representing the arithmetic expressions by giving suitable examples 4
3 43. Show the detailed concept of the stack to evaluate the following positive expression 325*+1^7+ * 44. Write the prefix and postfix form of the following infix expressions ((A + B) * C (DE)) $(F+G) b) (A+B)*(C+DE)*F 45. Implement stack using static and dynamic memory allocation. Discuss the relative merits of these two implementations 4. Write a program to check whether a given expression is a valid postfix expression or not. If valid evaluate a given postfix expression otherwise display a suitable message. 47. Write an algorithm for converting infix expression to postfix expression. Trace the algorithm indicating content of stack for expression (ab)/(c*d)+e 4. What are STACK? Explain operation performed on STACK. Discuss how the stack structure can be used for Tower of Hanoi problem 49. Convert the following infix expression into a postfix expression using stack i) a * (b+c) *d ii) ((a+b) * d + e)/((f+a*d) +c) Show that, how stack operations takes place for the conversion of infix to postfix 7 expression. ((A(B+C)) *D) $(E+F) 51. Write an algorithm to implement a stack of size N using an array. The elements in the stack are to be integers. The operations to be supported are PUSH, POP and DISPLAY. Take into account the exceptions of Stack overflow and underflow 52. Define queue. What are the different operations that can be performed on queue? Write a C program to implement all queue operations 53. Distinguish between Ordinary queues and Circular queues Write a program to implement a linear queue using arrays. Take into account the exceptions like Queue Full and Queue Empty. 55. Write a C function i) to insert an element at the rear end of a queue ii) to delete an element from the front end of the queue 5. A circular queue has a size of 5 and has 3 elements, 40 and 20, where F=2 and R=4. After inserting 50 and 0, what is value of F and R. Trying to insert 30 at this stage what will happen? Delete 2 elements from the queue and insert 0. Show the sequences of steps with necessary diagrams with the value of F and R UNIT III LINKED LISTS 57. What is a SLL? Write a program to implement stack as a singly linked list 5. What are the advantages and disadvantages of linked lists over arrays? What are different types of linked list? Write a C function to count number of 7 elements present in single linked list. 0. Write a recursive search routine to search for a node in a SLL
4 1. Write an algorithm to concatenate two lists (assume both are existing) 2. Write a C function to a. To count number of nodes using singly linked list b. To concatenate two singly linked list, and then to sort the resultant list c. To reverse direction of singly linked list(as shown below) 3. Write a program to represent a polynomial of single variable using linked list and perform the following functions a. Evaluation of polynomial b. Display the polynomial 4. Define and implement doubly link list 5. Write advantages of doubly linked list over singly linked list. Write C function that will insert a given integer value into an ordered doubly linked list.. What is a single linked list? Explain with an example how a single linked list can 7 be used for sorting a set of N numbers. 7. Write a program to find for a particular node (either the position or info of the 7 node can be given) in a DLL or circular DLL. What are the advantages and disadvantages of doubly linked list? Also give its applications 9. Write a C function to insert and delete a node from the front end in case of 4 doubly linked List. 70. Implement a circular SLL with the header node containing the total no of nodes in the list. The node itself consists of student details like reg no, name, marks etc. 71. What are the advantages of circularly linked list over a linear list? Write a C routine that concatenates two circular lists. 72. Write C functions to perform the following operations: a. Create a circular singly linked list b. Display Circular singly linked list 73. Write a function to insert a node at front and rear end in a circular linked list. Write down sequence of steps to be followed UNIT III STACKS AND QUEUES 74. Define stack. What are the different operations that can be performed on stack? Write a C program to implement all stack operations
5 75. Explain System stack in detail Write a note on multiple stacks Explain how the stack is used in parameter passing 4 7. Write short notes on dynamic stack representation Show the stack after each operation of the following sequence that starts with the empty stack: push(a), push(b), pop, push(c), push(d), pop 0. Define Stack as a data structure and discuss its applications 1. List applications of stacks. Using stack write an algorithm to determine if a given string is palindrome and print suitable message as output. 2. Obtain prefix and postfix expression a. (A+B)*(C+D)$(A+B) b. A+B*CD/E*H c. (A+B^C^D)*(E+F/D) 3. List the various ways of representing the arithmetic expressions by giving suitable examples 4. Show the detailed concept of the stack to evaluate the following positive expression 325*+1^7+ * 5. Write the prefix and postfix form of the following infix expressions ((A + B) * C (DE)) $(F+G) b) (A+B)*(C+DE)*F. Implement stack using static and dynamic memory allocation. Discuss the relative merits of these two implementations 7. Write a program to check whether a given expression is a valid postfix expression or not. If valid evaluate a given postfix expression otherwise display a suitable message.. Write an algorithm for converting infix expression to postfix expression. Trace the algorithm indicating content of stack for expression (ab)/(c*d)+e 9. What are STACK? Explain operation performed on STACK. Discuss how the stack structure can be used for Tower of Hanoi problem 90. Convert the following infix expression into a postfix expression using stack i) a * (b+c) *d ii) ((a+b) * d + e)/((f+a*d) +c) Show that, how stack operations takes place for the conversion of infix to postfix 7 expression. ((A(B+C)) *D) $(E+F) 92. Write an algorithm to implement a stack of size N using an array. The elements in the stack are to be integers. The operations to be supported are PUSH, POP and DISPLAY. Take into account the exceptions of Stack overflow and underflow 93. Define queue. What are the different operations that can be performed on queue? Write a C program to implement all queue operations 94. Distinguish between Ordinary queues and Circular queues Write a program to implement a linear queue using arrays. Take into account the
6 exceptions like Queue Full and Queue Empty. 9. Write a C function i) to insert an element at the rear end of a queue ii) to delete an element from the front end of the queue 97. A circular queue has a size of 5 and has 3 elements, 40 and 20, where F=2 and R=4. After inserting 50 and 0, what is value of F and R. Trying to insert 30 at this stage what will happen? Delete 2 elements from the queue and insert 0. Show the sequences of steps with necessary diagrams with the value of F and R UNIT V & VI TREES I, TREES II and GRAPHS 9. What are the different ways to represent binary trees? Explain in detail. 99. What are the differences between strictly binary tree and complete binary tree 4 0. What is a TREE? Define the following a. Ancestor b. Descendants of node with respect to the TREE 1. Write C functions for following tree traversals 9 i) Inorder ii) Preorder iii) Post order 2. Write and explain with a function, level order tree traversal 3. What is a heap and what are the different types of heap 4. Give examples to show the father, son, descendent and ascendant nodes of a binary tree 5. What are the two conditions under which a binary tree becomes an almost 4 complete binary tree?. Given the following traversals In order: E I C F J B G D K H L A Preorder: A B C E I F J D G H K L Construct a Binary Tree 7.. Explain the different methods of representation of binary trees in "C". 5. Explain threaded binary trees in detail 9. Define the following a. Strict binary tree b. Almost complete binary tree c. Ordered tree d. Right in threaded binary tree 1. Write a C recursive program to find out the height of a binary tree Construct a binary tree for the expression A + (BC)*(E+F)/G and draw the diagram showing each step Explain oneway and twoway threading of binary trees Implement the recursive tree traversal of in, pre and post order traversals 114. Write an algorithms for deleting node in a binary search tree for all the three cases 115. Write an expression tree for the expression A/B*C*D+E. Give the C function for
7 inorder, preorder, post order traversals and apply the traversal methods to the expression tree and give the result of traversals 11. Write an algorithm for the iterative tree traversal 117. Write an algorithm to traverse the tree using father field 11. Construct a binary tree for the expression: ((7+(3) * ) ^ 5+4) Define the following terms with appropriate sketches a) Tree b) Directed tree c) Ordered tree d) Binary tree e) Spanning tree 120. Write recursive C routines to traverse a binary tree in different ways. Assume the dynamic node representation of a binary tree 121. Define a tree recursively. Define the following terms with example. Siblings i. Descendants ii. Complete Binary Tree iii. Strictly Binary Tree (Full Binary Tree) 122. What is heap? Explain the different types of heap? Explain the following with an example: i) Forest ii) Graph iii) Winner tree 124. What is a binary search tree? Draw the binary search tree for the following input:14,5,,2,1,20,1,1, Define ADT of Binary search tree. Write the iterative search function and recursive search function of BST 12. Explain with an example how to convert given forest into binary trees UNIT VII  PRIORITY QUEUES 127. Explain min and max heap with example. 12. Implement Fibonacci heap What is binomial heap? Explain the steps involved in the deletion of min element from a binomial heap Define a max heap. Write a C function to insert an item into max heap Write short notes on: i) Priority queues ii) Leftist trees iii) Fibonacci heaps 132. Briefly explain the following with an example: i) HBLT ii) WBLT 133. What is Fibonacci heap? Give suitable example and give the steps for deletion of node and decrease key of specified node in Fheap Explain Single ended and Double ended Priority Queue Define FHeap. Explain the operations: Delete and Decrease key 13. Define Pairing Heap. Explain the following operations: getmin, insert, deletemin, meld,delete, decreasekey.
8 UNIT VIII  EFFICIENT BINARY SEARCH TREES 137. What is an AVL tree? Write the algorithm to insert an item in to AVL tree. 13. Explain the different types of rotations of an AVL tree Write short notes on: i) RedBlack tree. ii) Splay trees Describe the following with an example: i) Heightbalanced trees. ii) Optimal BST 141. Explain the RedBlack tree. State its properties 142. Explain i) BottomUp Splay Trees ii) TopDown Splay Trees 143. Let h be the height of a redblack tree, let n be the number of internal nodes in the tree and r be the rank of the root then, prove that i) h 2r ii) n 2 r 1. 4
9
10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions  a conventional tool for handling a
More informationDATA STRUCTURES USING C
DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give
More informationKrishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA213 : DATA STRUCTURES USING C
Tutorial#1 Q 1: Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2: What is a Data Type? Differentiate
More informationData Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
More informationCOURSE: B.TECHECE. IV Sem. Data structure Using C. b) Deletion of element in an array
COURSE: B.TECHECE. IV Sem Data structure Using C 1. Determine the formula to find the address location of an element in three dimensions array, suppose each element takes four bytes of space & elements
More information1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
More informationDEPARTMENT OF SCIENCE AND HUMANITIES CS6202PROGRAMMING AND DATA STRUCTURES I QUESTION BANK
DEPARTMENT OF SCIENCE AND HUMANITIES Sem/Year/Branch: II/I/CSE CS6202PROGRAMMING AND DATA STRUCTURES I QUESTION BANK UNIT I 1. Give two examples of C preprocessors with syntax.(apr/may 2015) 2. What are
More informationV.S.B. ENGINEERING COLLEGE, KARUR. Academic Year: (ODD Semester) Department of Computer Science and Engineering
V.S.B. ENGINEERING COLLEGE, KARUR Academic Year: 20162017 (ODD Semester) Department of Computer Science and Engineering Question Bank (2013 Regulations) S.No. Name of the Subject / Lab Semester Page No.
More informationData Structures 2014
Unit1 Introduction Short Questions:1. Define data structure. 2. Define algorithm. 3. List out areas in which data structures are applied. 4. List out structure of algorithm. 5. List out properties of
More informationUNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE
STUDENT IDENTIFICATION NO UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia
More information12 Abstract Data Types
12 Abstract Data Types 12.1 Source: 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).
More informationData Structures. Level 6 C30151. www.fetac.ie. Module Descriptor
The Further Education and Training Awards Council (FETAC) was set up as a statutory body on 11 June 2001 by the Minister for Education and Science. Under the Qualifications (Education & Training) Act,
More informationUnit 1. 5. Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]
Unit 1 1. Write the following statements in C : [4] Print the address of a float variable P. Declare and initialize an array to four characters a,b,c,d. 2. Declare a pointer to a function f which accepts
More information5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.
1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The
More informationCS 6202 PROGRAMMING & DATA STRUCTURESI PARTB UNITI ANNA UNIVERSITY QUESTIONS
PARTB UNITI 1. Write a function that returns a pointer to the maximum value of an array of double s.if the array is empty,return null? (8) Double*maximum(double*a,int size); 2. Write a c program to find
More informationQuestions 1 through 25 are worth 2 points each. Choose one best answer for each.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in
More informationBinary Heap Algorithms
CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell
More informationBhakta Kavi Narsinh Mehta University, Junagadh
Bhakta Kavi Narsinh Mehta University, Junagadh Draft Syllabus for B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester  1) Effective From June  2016 B.Sc. (C.S.) (Semester  1) CS101:
More informationGUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,
More informationData Structure and Algorithm I Midterm Examination 120 points Time: 9:10am12:10pm (180 minutes), Friday, November 12, 2010
Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am12:10pm (180 minutes), Friday, November 12, 2010 Problem 1. In each of the following question, please specify if the statement
More informationAS2261 M.Sc.(First Semester) Examination2013 Paper fourth SubjectData structure with algorithm
AS2261 M.Sc.(First Semester) Examination2013 Paper fourth SubjectData structure with algorithm Time: Three Hours] [Maximum Marks: 60 Note Attempts all the questions. All carry equal marks Section A
More informationCSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.
Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure
More informationLab Manual. Data Structures (Pr): COT213 Data Structures (P): IT215
Lab Manual Data Structures (Pr): COT213 Data Structures (P): IT215 !" #$%&'() * +, . 951/6201617535973417*37311 235678976: ;7A
More informationData Structure with C
Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which
More informationAtmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1
Data Structure By Ajay Raiyani Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1 Linked List 4 Singly Linked List...4 Doubly Linked List...7 Explain Doubly Linked list: ...7 Circular Singly Linked
More informationData Structures Using Java
Data Structures Using Java D. S. Malik P. S. Nair THOMSON COURSE TECHNOLOGY Australia Canada Mexico Singapore Spain United Kingdom United States TABLE OF Contents PREFACE XXV 1.Software Engineering Principles
More informationUNIT1 PARTA UNIT2 PARTA
UNIT1 1. Define computer? 2. Discuss briefly about input and output devices? 3. What is a RAM? 4. What is arom? 5. What is a compiler? 6. Write about a linker? 7. List any 5 key wordsof c? 8. Illustrate
More informationSample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
More informationModule 2 Stacks and Queues: Abstract Data Types
Module 2 Stacks and Queues: Abstract Data Types A stack is one of the most important and useful nonprimitive linear data structure in computer science. It is an ordered collection of items into which
More informationAP Computer Science AB Syllabus 1
AP Computer Science AB Syllabus 1 Course Resources Java Software Solutions for AP Computer Science, J. Lewis, W. Loftus, and C. Cocking, First Edition, 2004, Prentice Hall. Video: Sorting Out Sorting,
More informationAFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING
Sp2 AFF 826 Sub. Code 4BSO1C1 B.Sc. DEGREE EXAMINATION, NOVEMBER 2015 First Semester Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING (CBCS 2014 onwards) Time : 3 Hours Maximum : 75 Marks Part A (10
More informationVALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY
ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY
More informationAnalysis of a Search Algorithm
CSE 326 Lecture 4: Lists and Stacks 1. Agfgd 2. Dgsdsfd 3. Hdffdsf 4. Sdfgsfdg 5. Tefsdgass We will review: Analysis: Searching a sorted array (from last time) List ADT: Insert, Delete, Find, First, Kth,
More informationJava Software Structures
INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition
More informationAbstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types
EECS 281: Data Structures and Algorithms The Foundation: Data Structures and Abstract Data Types Computer science is the science of abstraction. Abstract Data Type Abstraction of a data structure on that
More information1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated
More informationTo My Parents Laxmi and Modaiah. To My Family Members. To My Friends. To IIT Bombay. To All Hard Workers
To My Parents Laxmi and Modaiah To My Family Members To My Friends To IIT Bombay To All Hard Workers Copyright 2010 by CareerMonk.com All rights reserved. Designed by Narasimha Karumanchi Printed in
More informationThe following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).
CHAPTER 5 The Tree Data Model There are many situations in which information has a hierarchical or nested structure like that found in family trees or organization charts. The abstraction that models hierarchical
More informationPrevious Lectures. BTrees. External storage. Two types of memory. Btrees. Main principles
BTrees Algorithms and data structures for external memory as opposed to the main memory BTrees Previous Lectures Height balanced binary search trees: AVL trees, redblack trees. Multiway search trees:
More informationData Structure. Lecture 3
Data Structure Lecture 3 Data Structure Formally define Data structure as: DS describes not only set of objects but the ways they are related, the set of operations which may be applied to the elements
More informationData Structures Using C++ 2E. Chapter 5 Linked Lists
Data Structures Using C++ 2E Chapter 5 Linked Lists Doubly Linked Lists Traversed in either direction Typical operations Initialize the list Destroy the list Determine if list empty Search list for a given
More informationEE2204 DATA STRUCTURES AND ALGORITHM (Common to EEE, EIE & ICE)
EE2204 DATA STRUCTURES AND ALGORITHM (Common to EEE, EIE & ICE) UNIT I LINEAR STRUCTURES Abstract Data Types (ADT) List ADT arraybased implementation linked list implementation cursorbased linked lists
More informationCS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II  CSE III  SEMESTER ACADEMIC YEAR:
CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II  CSE III  SEMESTER ACADEMIC YEAR: 20122013 SCHOOL OF COMPUTER SCIENCE & ENGINEERING SRM UNIVERSITY, SRM NAGAR, KATTANKULATHUR603203.
More informationChapter There are nonisomorphic rooted trees with four vertices. Ans: 4.
Use the following to answer questions 126: In the questions below fill in the blanks. Chapter 10 1. If T is a tree with 999 vertices, then T has edges. 998. 2. There are nonisomorphic trees with four
More informationComp 245 Data Structures. Stacks
Comp 245 Data Structures Stacks What is a Stack? A LIFO (last in, first out) structure Access (storage or retrieval) may only take place at the TOP NO random access to other elements within the stack An
More informationCOURSE CONTENTS. 3 months 8:30 am  3:30 pm Mon  Fri. [Admissions strictly through written test based on Basic C and Aptitude]
COURSE CONTENTS 3 months 8:30 am  3:30 pm Mon  Fri [Admissions strictly through written test based on Basic C and Aptitude] Subhash Programming Classes Revision: January, 2016 All rights reserved Call:
More informationData Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
More informationBinary Search Trees CMPSC 122
Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than
More informationMarathwada Institute of Technology
Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part  I (Question
More informationTREE BASIC TERMINOLOGIES
TREE Trees are very flexible, versatile and powerful nonliner data structure that can be used to represent data items possessing hierarchical relationship between the grand father and his children and
More informationCS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science
CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science Semester and Year: Spring 2009 Classroom Section, Meeting Times,
More informationSummary. Pre requisition. Content Details: 1. Basics in C++
Summary C++ Language is one of the approaches to provide objectoriented functionality with C like syntax. C++ adds greater typing strength, scoping and other tools useful in objectoriented programming
More informationMAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) 
=============================================================================================================================== DATA STRUCTURE PSEUDOCODE EXAMPLES (c) Mubashir N. Mir  www.mubashirnabi.com
More informationSANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (201415) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E.
SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (201415) ASSIGNMENT / QUESTION BANK Subject: Computer Programming and Utilization (2110003) [F.Y.B.E.: ALL BRANCHES] Unit 1
More informationTrees & Binary Search Trees
CMSC 132: ObjectOriented Programming II Trees & Binary Search Trees Department of Computer Science University of Maryland, College Park Trees Trees are hierarchical data structures Onetomany relationship
More informationBinary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( BST) are of the form. P parent. Key. Satellite data L R
Binary Search Trees A Generic Tree Nodes in a binary search tree ( BST) are of the form P parent Key A Satellite data L R B C D E F G H I J The BST has a root node which is the only node whose parent
More informationFundamentals of Computer & Programming in C Shortanswer type questions
Fundamentals of Computer & Programming in C Shortanswer type questions Section A i. What is a computer system? Draw the block diagram of computer. ii. Differentiate between Real Time Operating System
More informationAlgorithms and Data Structures
Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. RalfPeter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2
More informationKITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact:  8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
More informationLearning Outcomes. COMP202 Complexity of Algorithms. Binary Search Trees and Other Search Trees
Learning Outcomes COMP202 Complexity of Algorithms Binary Search Trees and Other Search Trees [See relevant sections in chapters 2 and 3 in Goodrich and Tamassia.] At the conclusion of this set of lecture
More informationBTrees. Algorithms and data structures for external memory as opposed to the main memory BTrees. B trees
BTrees Algorithms and data structures for external memory as opposed to the main memory BTrees Previous Lectures Height balanced binary search trees: AVL trees, redblack trees. Multiway search trees:
More informationCOT5405 Analysis of Algorithms Homework 3 Solutions
COT0 Analysis of Algorithms Homework 3 Solutions. Prove or give a counter example: (a) In the textbook, we have two routines for graph traversal  DFS(G) and BFS(G,s)  where G is a graph and s is any
More informationC programming: exercise sheet L2STUE (20112012)
C programming: exercise sheet L2STUE (20112012) Algorithms and Flowcharts Exercise 1: comparison Write the flowchart and associated algorithm that compare two numbers a and b. Exercise 2: 2 nd order
More informationCOMPUTER SCIENCE. Paper 1 (THEORY)
COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) 
More informationUTTARAKHAND OPEN UNIVERSITY
MCA Second Semester MCA05 Computer Organization and Architecture MCA06 Data Structure through C Language MCA07 Fundamentals of Database Management System MCA08 Project I MCAP2 Practical MCA05 Computer
More informationLECTURE NOTES ON DATA STRUCTURES USING C
LECTURE NOTES ON DATA STRUCTURES USING C Revision 4.0 1 December, 2014 L. V. NARASIMHA PRASAD Professor Department of Computer Science and Engineering E. KRISHNA RAO PATRO Associate Professor Department
More informationML for the Working Programmer
ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming
More informationInternational Journal Of Engineering Research & Management Technology
International Journal Of Engineering Research & Management Technology ISSN: 23484039 September 2014 Volume 1, Issue5 Dynamic Implementation Using Linked List Karuna Department of Information and Technology
More informationECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 20081023/5:156:45 REC200, EVI350, RCH106, HH139
ECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 20081023/5:156:45 REC200, EVI350, RCH106, HH139 Instructions: No aides. Turn off all electronic media and store them under your desk. If
More informationData Structures UNIT III. Model Question Answer
Data Structures UNIT III Model Question Answer Q.1. Define Stack? What are the different primitive operations on Stack? Ans: Stack: A stack is a linear structure in which items may be added or removed
More informationSymbol Tables. IE 496 Lecture 13
Symbol Tables IE 496 Lecture 13 Reading for This Lecture Horowitz and Sahni, Chapter 2 Symbol Tables and Dictionaries A symbol table is a data structure for storing a list of items, each with a key and
More informationOverview of Data Structures
UNIT 3 Concrete Data Types Classification of Data Structures Concrete vs. Abstract Data Structures Most Important Concrete Data Structures Arrays Records Linked Lists Binary Trees Overview of Data Structures
More informationData Structures and Algorithms Written Examination
Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where
More informationDefinition. E.g. : Attempting to represent a transport link data with a tree structure:
The ADT Graph Recall the ADT binary tree: a tree structure used mainly to represent 1 to 2 relations, i.e. each item has at most two immediate successors. Limitations of tree structures: an item in a tree
More informationData Structures and Algorithms. with ObjectOriented Design Patterns in C++
Data Structures and Algorithms with ObjectOriented Design Patterns in C++ Data Structures and Algorithms with ObjectOriented Design Patterns in C++ Bruno R. Preiss B.A.Sc., M.A.Sc., Ph.D., P.Eng. Associate
More informationFrom Last Time: Remove (Delete) Operation
CSE 32 Lecture : More on Search Trees Today s Topics: Lazy Operations Run Time Analysis of Binary Search Tree Operations Balanced Search Trees AVL Trees and Rotations Covered in Chapter of the text From
More informationPARTA Questions. 2. How does an enumerated statement differ from a typedef statement?
1. Distinguish & and && operators. PARTA Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members
More informationHome Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit
Data Structures Page 1 of 24 A.1. Arrays (Vectors) nelement vector start address + ielementsize 0 +1 +2 +3 +4... +n1 start address continuous memory block static, if size is known at compile time dynamic,
More informationExam study sheet for CS2711. List of topics
Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure
More informationOrdered Lists and Binary Trees
Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 60:
More informationBCS2B02: OOP Concepts and Data Structures Using C++
SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal
More informationUnit 5: Recursion Part 3. Application of Recursion to Languages. Grammar. Engineering 4892: Data Structures. June 14, 2011
Unit 5: Recursion Part 3 1 Application of Recursion to Languages Engineering 4892: Data Structures 1 Application of Recursion to Linked Lists Faculty of Engineering & Applied Science Memorial University
More informationStacks. Linear data structures
Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations
More information2013 Five years Integrated M.Sc.(IT) Semester 1 060010101  Fundamentals of Programming
03 Five years Integrated M.Sc.(IT) Semester 00000  Fundamentals Programming File should contain. Problem Statement. Algorithm 3. Flowchart. Program in C language(code) 5. Output and sample calculation
More informationAnnouncements. CSE332: Data Abstractions. Lecture 9: B Trees. Today. Our goal. Mary Search Tree. Mary Search Tree. Ruth Anderson Winter 2011
Announcements CSE2: Data Abstractions Project 2 posted! Partner selection due by 11pm Tues 1/25 at the latest. Homework due Friday Jan 28 st at the BEGINNING of lecture Lecture 9: B Trees Ruth Anderson
More informationObjected oriented Programming: C++ Unit 1 1. Introduction 1.1. Introduction to Object Oriented Programming. 1.2. C++ fundamentals.
Gujarat University Choice Based Credit System (CBCS) Syllabus for B. Sc. Semester III (Computer Science) COM 201: DATA STRUCTURE USING C++ (Theory) Hours: 4 /week Credits: 4 Objected oriented Programming:
More informationConverting a Number from Decimal to Binary
Converting a Number from Decimal to Binary Convert nonnegative integer in decimal format (base 10) into equivalent binary number (base 2) Rightmost bit of x Remainder of x after division by two Recursive
More information1 23 Trees: The Basics
CS10: Data Structures and ObjectOriented Design (Fall 2013) November 1, 2013: 23 Trees: Inserting and Deleting Scribes: CS 10 Teaching Team Lecture Summary In this class, we investigated 23 Trees in
More informationTrees Carlos Delgado Kloos Mª Carmen Fernández Panadero Raquel M. Crespo García Dep. Ingeniería Telemática Univ. Carlos III de Madrid
Trees Carlos Delgado Kloos Mª Carmen Fernández Panadero Raquel M. Crespo García Dep. Ingeniería Telemática Univ. Carlos III de Madrid cdk@it.uc3m.es Java: Trees / 1 Contents Concept Non recursive definition
More informationChapter 3: Restricted Structures Page 1
Chapter 3: Restricted Structures Page 1 1 2 3 4 5 6 7 8 9 10 Restricted Structures Chapter 3 Overview Of Restricted Structures The two most commonly used restricted structures are Stack and Queue Both
More informationData Structures and Algorithms V22.0102. Otávio Braga
Data Structures and Algorithms V22.0102 Otávio Braga We use a stack When an operand is read, output it When an operator is read Pop until the top of the stack has an element of lower precedence Then push
More informationCpt S 223. School of EECS, WSU
Priority Queues (Heaps) 1 Motivation Queues are a standard mechanism for ordering tasks on a firstcome, firstserved basis However, some tasks may be more important or timely than others (higher priority)
More informationIntroduction to Data Structures
Introduction to Data Structures Albert Gural October 28, 2011 1 Introduction When trying to convert from an algorithm to the actual code, one important aspect to consider is how to store and manipulate
More informationBinary Trees and Huffman Encoding Binary Search Trees
Binary Trees and Huffman Encoding Binary Search Trees Computer Science E119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Motivation: Maintaining a Sorted Collection of Data A data dictionary
More informationBinary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child
Binary Search Trees Data in each node Larger than the data in its left child Smaller than the data in its right child FIGURE 116 Arbitrary binary tree FIGURE 117 Binary search tree Data Structures Using
More informationChapter 7. Multiway Trees. Data Structures and Algorithms in Java
Chapter 7 Multiway Trees Data Structures and Algorithms in Java Objectives Discuss the following topics: The Family of BTrees Tries Case Study: Spell Checker Data Structures and Algorithms in Java 2 Multiway
More informationDEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN
ERODE SENGUNTHAR ENGINEERING COLLEGE (Approved by AICTE, New Delhi, Permanently Affiliated to Anna University  Chennai & Accredited by NAAC & National Board of Accreditation (NBA), New Delhi, Accredited
More informationMadhya Pradesh Bhoj (Open) University, Bhopal Class : MCA I st Year
Class : MCA I st Year 201415 Subject : Computer Organization and System Software 3& l=h; dk;z tek djus dh vafre frffk 30092015 gsa Q.1 Explain the Combinational Logic Circuit Design in detail. Q.2 Explain
More informationTrees. Definition: A tree is a connected undirected graph with no simple circuits. Example: Which of these graphs are trees?
Section 11.1 Trees Definition: A tree is a connected undirected graph with no simple circuits. Example: Which of these graphs are trees? Solution: G 1 and G 2 are trees both are connected and have no simple
More informationCommon Data Structures
Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees
More information