DATA STRUCTURE Subject Code -14B11CI211.

Slides:



Advertisements
Similar presentations
Chapter 1: INTRODUCTION TO DATA STRUCTURE
Advertisements

MATH 224 – Discrete Mathematics
Recursion vs. Iteration The original Lisp language was truly a functional language: –Everything was expressed as functions –No local variables –No iteration.
Lecture - 1 on Data Structures. Prepared by, Jesmin Akhter, Lecturer, IIT,JU Data Type and Data Structure Data type Set of possible values for variables.
Abstract Data Types (ADT)
Rossella Lau Lecture 1, DCO20105, Semester A, DCO Data structures and algorithms  Lecture 1: Introduction What this course is about:  Data.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Rossella Lau Lecture 1, DCO20105, Semester A, DCO Data structures and algorithms  Lecture 1: Introduction What this course is about:  Data.
Chapter 1 Introduction Definition of Algorithm An algorithm is a finite sequence of precise instructions for performing a computation or for solving.
HORSEED International University
Introduction - The Need for Data Structures Data structures organize data –This gives more efficient programs. More powerful computers encourage more complex.
Data Structures Lecture-1:Introduction
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
Copyright © Wondershare Software Introduction to Data Structures Prepared by: Eng. Ahmed & Mohamed Taha.
Lecture No.01 Data Structures Dr. Sohail Aslam
Week 2 CS 361: Advanced Data Structures and Algorithms
CSCA48 Course Summary.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 19: Searching and Sorting Algorithms.
Chapter 19: Searching and Sorting Algorithms
Instructor Information: Dr. Radwa El Shawi Room: Week # 1: Overview & Review.
Computer Science Department Data Structure & Algorithms Lecture 8 Recursion.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
Prepared By Ms.R.K.Dharme Head Computer Department.
1 Introduction to Data Structures. 2 Course Name : Data Structure (CSI 221) Course Teacher : Md. Zakir Hossain Lecturer, Dept. of Computer Science Stamford.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
 DATA STRUCTURE DATA STRUCTURE  DATA STRUCTURE OPERATIONS DATA STRUCTURE OPERATIONS  BIG-O NOTATION BIG-O NOTATION  TYPES OF DATA STRUCTURE TYPES.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
INTRODUCTION TO DATA STRUCTURES. INTRODUCTION A data structure is nothing but an arrangement of data either in computer's memory or on the disk storage.
Data Structure Introduction.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Lecture 11 Data Structures, Algorithms & Complexity Introduction Dr Kevin Casey BSc, MSc, PhD GRIFFITH COLLEGE DUBLIN.
Data Abstaraction Chapter 10.
Chapter 18: Searching and Sorting Algorithms. Objectives In this chapter, you will: Learn the various search algorithms Implement sequential and binary.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Elementary Data Organization. Outline  Data, Entity and Information  Primitive data types  Non primitive data Types  Data structure  Definition 
WELCOME to III SEM Date: Class - ECE no of present : no of absent :
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Chapter 9: Sorting1 Sorting & Searching Ch. # 9. Chapter 9: Sorting2 Chapter Outline  What is sorting and complexity of sorting  Different types of.
Data Structure and Algorithms
Constructs for Data Organization and Program Control, Scope, Binding, and Parameter Passing. Expression Evaluation.
ARRAYS IN C/C++ (1-Dimensional & 2-Dimensional) Introduction 1-D 2-D Applications Operations Limitations Conclusion Bibliography.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
LINKED LISTS.
Lecture 2. Algorithms and Algorithm Convention 1.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Advanced Data Structures Lecture 1
Introduction toData structures and Algorithms
Programming and Data Structures
Introduction to Data Structures
Advanced Algorithms Analysis and Design
Introduction to Algorithms
Introduction to Analysis of Algorithms
Course Developer/Writer: A. J. Ikuomola
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
GC211Data Structure Lecture2 Sara Alhajjam.
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
Algorithm Analysis CSE 2011 Winter September 2018.
Introduction to Data Structure
Data Structures (CS212D) Overview & Review.
Objective of This Course
Data Structures: Introductory lecture
Week # 1: Overview & Review
Data Structures (CS212D) Overview & Review.
Introduction to Data Structures
Introduction to Algorithms
Data Structures and Algorithms Lecture-1: Introduction
Presentation transcript:

DATA STRUCTURE Subject Code -14B11CI211

Syllabus Introduction to Data Structures Algorithm and Complexity Array Searching And Sorting Algorithms Stack Queue Linked List Graph and Tree

Recommended Books Text Books: Seymour Lipschutz, “Data Structure”, Schaum’s Outlines, Tata McGraw Hill Sartaj Sahni, “Data Structures, Algorithms”, Tata Mc Graw Hill, New York Preiss, Bruno R., “Data Structures and Algorithms: With Object-Oriented Design Patterns in C++ “, John Wiley & Sons, New York R.S. Salaria, “Data structure and algorithms using C” Reference Books: Kruse, Tonso, Leung, “Data Structures and Program Design in C” Langsam, Augestein, Tanenbaum, “Data Structures using C and C++” Weiss, “Data Structures and Algorithm Analysis in C/C++” Carrano and Prichard, “Data Abstraction and Problem solving with C++” Corman at el, “Introduction to Algorithms”

Marks Distribution Component & Nature Duration Marks / Weightage Mid Sem 2 hrs 30 End Sem 3 hrs 45 Tutorials 10 Attendance 05 Quiz & Assignments Total 100

Evaluation Plan (Laboratory) Lab work & Lab record 50 Mid sem lab – Viva/Test(P1) 20 End sem lab – Viva/Test(P2) 20 Attendance & discipline in lab 10 Total 100

Prerequisite Knowledge Basic programming constructs from C programming like data types, operators, decision control, loops, string and functions etc. Dynamic memory allocation Pointers

Introduction to Data Structures

Why This Course? You will be able to evaluate the quality of a program (Analysis of Algorithms: Running time and memory space ) You will be able to write fast programs You will be able to solve new problems You will be able to give non-trivial methods to solve problems. (Your algorithm (program) will be faster than others.)

Preface of Data structure Even though computers can perform literally millions of mathematical computations per second, when a problem gets large and complicated, performance can nonetheless be an important consideration. One of the most crucial aspects to how quickly a problem can be solved is how the data is stored in memory.  Data Structure ? A data structure is a particular way of organizing data in a computer so that it can be used efficiently.

Operations on Data Structures Basic operation – Traversing – Accessing and processing record exactly once Insertion – Adding new record to data structure Deletion – Removing particular record from the data structure Searching – Finding the location of the record in data structure Special operation – Sorting – Arranging the record in some specific order Merging – Combining the records from different data structures to single data structure

ALGORITHM A well-defined computational procedure that takes some value, or a set of values, as input and produces some value, or a set of values, as output. It can also be defined as sequence of computational steps that transform the input into the output. An algorithm can be expressed in three ways:- (i) in any natural language such as English, called pseudo code. (ii) in a programming language or (iii) in the form of a flowchart.

What is Good Algorithm? There are so many different algorithms for solving a certain problem. Good algorithm is an efficient algorithm. What is efficient? Efficient is something, which has small running time and takes less memory. These will be the two measures of efficiency we will be working with.

Algorithm Vs Program What is the difference between an algorithm and a program?  a program is an implementation of an algorithm to be run on a specific computer and operating system.  an algorithm is more abstract – it does not deal with machine specific details – think of it as a method to solve a problem.

Cost Cost of data structure or algorithm is always calculated in terms of following parameters – Time Complexity: Time required to perform a basic operation on data Space Complexity: Memory space required to store the data items of data structure Programming efforts to write code for basic operations.

Space – Time Tradeoff Reduction of needed space could increase the time of execution. Example – Compressed and uncompressed data – A space–time tradeoff can be applied to the problem of data storage. If data is stored uncompressed, it takes more space but less time than if the data were stored compressed (since compressing the data reduces the amount of space it takes, but it takes time to run the decompression algorithm). Depending on the particular instance of the problem, either way is practical. Smaller code and loop unrolling – Larger code size can be traded for higher program speed when applying loop unrolling(A basic compiler optimization is known as 'loop unrolling. Loop unrolling means going back to some previous statement.). This technique makes the code longer for each iteration of a loop, but saves the computation time required for jumping back to the beginning of the loop at the end of each iteration.

Type of data structures Array Stack Queue Linked list Tree Graph Heap etc.

Selection of data structure Organization of data in memory affects the performance of algorithm So, selection of data structure plays important role to make algorithm efficient But, it depends on the nature of problem and operations to be supported. Typically, following steps are to be followed to select an efficient data structure – Analyze the problem very carefully and estimate the resources so that solution must meet. Determine the basic operation to be supported Select the best data structure which meets the above requirements.

Basic Mathematical Notations Floor Function – d or floor(d)   is the largest integer not greater than d  Example: 2.4 = 2, 3.5 = 3, 3.9 = 3, -8.2 = -9 and 5 = 5 etc. Ceiling Function – d or ceiling(d)   is the smallest integer not less than d Example: 2.4 = 3, 3.5 = 4, -8.2 = -8, and 5 = 5 etc. Therefore, if d is integer then, d = d , Otherwise d + 1 = d

Basic Mathematical Notations (Cont…) Let k be any integer and let M be a positive integer. Then, r = k (mod M), r is remainder and 0 <= r < M, Therefore, k = Mq + r, where q is quotient. Integer value of d is denoted by INT(d) INT(3.2) = 3, INT(6.7) = 6, INT(-8.2) =-8

Data types (Recollect)

Data types (Cont…) Abstract Data Type (ADT) – A data type can be considered abstract when it is defined in terms of operations on it, and its implementation is hidden. Here are some examples:  1. stack: operations are "push an item onto the stack", "pop an item from the stack", "ask if the stack is empty"; implementation may be as array or linked list or whatever. 2. queue: operations are "add to the end of the queue", "delete from the beginning of the queue", "ask if the queue is empty"; implementation may be as array or linked list or heap.