Example: confidence

LECTURE NOTES ON DATA STRUCTURES

LECTURE NOTES ON DATA STRUCTURES Year : 2017 - 2018 Course Code : ACS102 Regulations : R16 Semester : I II Semester Branch : CSE / IT / ECE / EEE Prepared by Ms. B Padmaja Associate Professor INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 DATA STRUCTURES II Semester: CSE / ECE / EEE / IT Course Code Category Hours / Week Credits Maximum Marks ACS002 Foundation L T P C CIA SEE Total 3 1 - 4 30 70 100 Contact Classes: 45 Tutorial Classes: 15 Practical Classes: Nil Total Classes: 60 COURSE OBJECTIVES: The course should enable the students to: I. Learn the basic techniques of algorithm analysis. II. Demonstrate several searching and sorting algorithms. III. Implement linear and non-linear data STRUCTURES . IV. Demonstrate various tree and graph traversal algorithms.

performed, using as few resources, both execution time and memory space, as possible. Data structure introduction refers to a scheme for organizing data, or in other words it is an arrangement of data in computer's memory in such a way that it could make the data quickly available to the processor for required calculations.

Tags:

  Memory

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of LECTURE NOTES ON DATA STRUCTURES

1 LECTURE NOTES ON DATA STRUCTURES Year : 2017 - 2018 Course Code : ACS102 Regulations : R16 Semester : I II Semester Branch : CSE / IT / ECE / EEE Prepared by Ms. B Padmaja Associate Professor INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 DATA STRUCTURES II Semester: CSE / ECE / EEE / IT Course Code Category Hours / Week Credits Maximum Marks ACS002 Foundation L T P C CIA SEE Total 3 1 - 4 30 70 100 Contact Classes: 45 Tutorial Classes: 15 Practical Classes: Nil Total Classes: 60 COURSE OBJECTIVES: The course should enable the students to: I. Learn the basic techniques of algorithm analysis. II. Demonstrate several searching and sorting algorithms. III. Implement linear and non-linear data STRUCTURES . IV. Demonstrate various tree and graph traversal algorithms.

2 V. Analyze and choose appropriate data structure to solve problems in real world. UNIT - 1 INTRODUCTION TO DATA STRUCTURES , SEARCHING AND SORTING Basic concepts: Introduction to data STRUCTURES , classification of data STRUCTURES , operations on data STRUCTURES , abstract data type, algorithms, different approaches to design an algorithm, recursive algorithms; Searching techniques: Linear search, binary search and Fibonacci search; Sorting techniques: Bubble sort, selection sort, insertion sort, quick sort, merge sort, and comparison of sorting algorithms. UNIT - 2 LINEAR DATA STRUCTURES Stacks: Primitive operations, implementation of stacks using Arrays, applications of stacks arithmetic expression conversion and evaluation; Queues: Primitive operations; Implementation of queues using Array, applications of linear queue, circular queue and double ended queue (DEQUE).

3 UNIT - 3 LINKED LISTS Linked lists: Introduction, singly linked list, representation of a linked list in memory , operations on a Single linked list; Applications of linked lists: Polynomial representation and sparse matrix manipulation. Types of linked lists: Circular linked lists, doubly linked lists; Linked list representation and operations of Stack, linked list representation and operations of queue. UNIT - 4 NON LINEAR DATA STRUCTURES Trees : Basic concept, binary tree, binary tree representation, array and linked representations, binary tree traversal, binary search tree, tree variants, application of trees; Graphs: Basic concept, graph terminology, graph implementation, graph traversals, Application of graphs, Priority Queue. UNIT - 5 BINARY TREES AND HASHING Binary search trees: Binary search trees, properties and operations; Balanced search trees: AVL trees; Introduction to M - Way search trees, B trees; Hashing and collision: Introduction, hash tables, hash functions, collisions, applications of hashing.

4 LIST OF REFERENCE BOOKS: 1. Y Daniel Liang, Introduction to Programming using Python , Pearson. 2. Benjamin Baka, David Julian, Python Data STRUCTURES and Algorithms , Packt Publishers,2017. 3. Rance D. Necaise, Data STRUCTURES and Algorithms using Python , Wiley Student Edition. 4. Martin Jones, Python for Complete Beginners , 2015. 5. Zed A. Shaw, Learn Python the Hard Way: a very simple introduction to the terrifyingly beautiful world of computers and code , 3e, Addison-Wesley, 2014. 6. Hemant Jain, Problem Solving in Data STRUCTURES and Algorithms using Python: programming interview guide , 2016. WEB REFERENCES: 1. 2. 3. 4. 5. 6. 1 UNIT I INTRODUCTION TO DATA STRUCTURES , SEARCHING AND SORTING Basic Concepts: Introduction to Data STRUCTURES : A data structure is a way of storing data in a computer so that it can be used efficiently and it will allow the most efficient algorithm to be used.

5 The choice of the data structure begins from the choice of an abstract data type (ADT). A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible. Data structure introduction refers to a scheme for organizing data, or in other words it is an arrangement of data in computer's memory in such a way that it could make the data quickly available to the processor for required calculations. A data structure should be seen as a logical concept that must address two fundamental concerns. 1. First, how the data will be stored, and 2. Second, what operations will be performed on it. As data structure is a scheme for data organization so the functional definition of a data structure should be independent of its implementation.

6 The functional definition of a data structure is known as ADT (Abstract Data Type) which is independent of implementation. The way in which the data is organized affects the performance of a program for different tasks. Computer programmers decide which data STRUCTURES to use based on the nature of the data and the processes that need to be performed on that data. Some of the more commonly used data STRUCTURES include lists, arrays, stacks, queues, heaps, trees, and graphs. Classification of Data STRUCTURES : Data STRUCTURES can be classified as Simple data structure Compound data structure Linear data structure Non linear data structure [Fig Classification of Data STRUCTURES ] Simple Data Structure: Simple data structure can be constructed with the help of primitive data structure.

7 A primitive data 2 structure used to represent the standard data types of any one of the computer languages. Variables, arrays, pointers, STRUCTURES , unions, etc. are examples of primitive data STRUCTURES . Compound Data structure: Compound data structure can be constructed with the help of any one of the primitive data structure and it is having a specific functionality. It can be designed by user. It can be classified as Linear data structure Non-linear data structure Linear Data Structure: Linear data STRUCTURES can be constructed as a continuous arrangement of data elements in the memory . It can be constructed by using array data type. In the linear Data STRUCTURES the relationship of adjacency is maintained between the data elements. Operations applied on linear data structure: The following list of operations applied on linear data STRUCTURES 1.

8 Add an element 2. Delete an element 3. Traverse 4. Sort the list of elements 5. Search for a data element For example Stack, Queue, Tables, List, and Linked Lists. Non-linear Data Structure: Non-linear data structure can be constructed as a collection of randomly distributed set of data item joined together by using a special pointer (tag). In non-linear Data structure the relationship of adjacency is not maintained between the data items. Operations applied on non-linear data STRUCTURES : The following list of operations applied on non-linear data STRUCTURES . 1. Add elements 2. Delete elements 3. Display the elements 4. Sort the list of elements 5. Search for a data element For example Tree, Decision tree, Graph and Forest Abstract Data Type: An abstract data type, sometimes abbreviated ADT, is a logical description of how we view the data and the operations that are allowed without regard to how they will be implemented.

9 This means that we are concerned only with what data is representing and not with how it will eventually be constructed. By providing this level of abstraction, we are creating an encapsulation around the data. The idea is that by encapsulating the details of the implementation, we are hiding them from the user s view. This is called information hiding. The implementation of an abstract data type, often referred to as a data structure, will require that we provide a physical view of the data using some collection of programming constructs and primitive data types. 3 [Fig. : Abstract Data Type (ADT)] Algorithms: Structure and Properties of Algorithm: An algorithm has the following structure 1. Input Step 2. Assignment Step 3. Decision Step 4.

10 Repetitive Step 5. Output Step An algorithm is endowed with the following properties: 1. Finiteness: An algorithm must terminate after a finite number of steps. 2. Definiteness: The steps of the algorithm must be precisely defined or unambiguously specified. 3. Generality: An algorithm must be generic enough to solve all problems of a particular class. 4. Effectiveness: the operations of the algorithm must be basic enough to be put down on pencil and paper. They should not be too complex to warrant writing another algorithm for the operation. 5. Input-Output: The algorithm must have certain initial and precise inputs, and outputs that may be generated both at its intermediate and final steps. Different Approaches to Design an Algorithm: An algorithm does not enforce a language or mode for its expression but only demands adherence to its properties.


Related search queries