Data Structures - Review

Slides:



Advertisements
Similar presentations
PROGRAMMING LANGUAGE (JAVA) UNIT 42 BY ROBERT BUTTERFIELD TELEPHONE Data Structures and Algorithms.
Advertisements

CS 307 Fundamentals of Computer Science 1 Abstract Data Types many slides taken from Mike Scott, UT Austin.
Data Structure TA: Abbas Sarraf
1 Data Structures  We can now explore some advanced techniques for organizing and managing information  Chapter 12 of the book focuses on: dynamic structures.
Data Structures from Cormen, Leiserson, Rivest & Stein.
Data Structures, Spring 2004 © L. Joskowicz 1 DAST – Final Lecture Summary and overview What we have learned. Why it is important. What next.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Dynamic Sets and Data Structures Over the course of an algorithm’s execution, an algorithm may maintain a dynamic set of objects The algorithm will perform.
Algorithms and Data Structures Representing Sequences by Arrays and Linked Lists.
October 18, Algorithms and Data Structures Lecture V Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Chapter 3 List Stacks and Queues. Data Structures Data structure is a representation of data and the operations allowed on that data. Data structure is.
Data Structures and Abstract Data Types "Get your data structures correct first, and the rest of the program will write itself." - David Jones.
Computer Science Department Data Structures and Algorithms Lecture 1.
Elementary Data Structures Data Structures and Algorithms A. G. Malamos.
October 18, Algorithms and Data Structures Lecture V Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Binary SearchTrees [CLRS] – Chap 12. What is a binary tree ? A binary tree is a linked data structure in which each node is an object that contains following.
Lecture 11 Data Structures, Algorithms & Complexity Introduction Dr Kevin Casey BSc, MSc, PhD GRIFFITH COLLEGE DUBLIN.
Foundation of Computing Systems Lecture 3 Stacks and Queues.
Graph Introduction, Searching Graph Theory Basics - Anil Kishore.
WELCOME to III SEM Date: Class - ECE no of present : no of absent :
2 Obaid Ullah HOD Computer Science Dept. Superior University Sialkot Campus.
Algorithms and Data Structures Lecture VI
Design and Analysis of Algorithms CS st Term Course Syllabus Cairo University Faculty of Computers and Information.
Introduction to Data Structure and Algorithms
9/27/2016IT 1791 Abstraction A tool (concept) to manage complexity Hide irrelevant details; focus on the features needed Primitive date types are already.
Data Structures - Review [CLRS] – Chap 10, Chap 11, Chap 6.5.
Minimum Spanning Tree Graph Theory Basics - Anil Kishore.
Elementary data structures
Queues 5/11/2018 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H.
G64ADS Advanced Data Structures
Set Collection A Bag is a general collection class that implements the Collection interface. A Set is a collection that resembles a Bag with the provision.
Data Structures Michael J. Watts
Fundamentals of Programming II Overview of Collections
Chapter 15 Lists Objectives
ET 2006 : Data Structures & Algorithms
Abstraction A tool (concept) to manage complexity
Chapter 12: Data Structures
Queues Queues Queues.
CO4301 – Advanced Games Development Week 10 Red-Black Trees continued
Data Structures and Database Applications Abstract Data Types
ECET 370 HELPS Education for Service- - ecet370helps.com.
structures and their relationships." - Linus Torvalds
Abstract Data Types (ADTs)
Definition In simple terms, an algorithm is a series of instructions to solve a problem (complete a task) We focus on Deterministic Algorithms Under the.
Algorithms Part III. Data Structures
structures and their relationships." - Linus Torvalds
در اين درس مباني ساختمان داده ها و الگوريتم ها تدریس میشود.
ITEC 2620M Introduction to Data Structures
Data Structures: Introductory lecture
Lesson 6. Types Equality and Identity. Collections.
CMPT 438 Algorithms Instructor: Tina Tian.
Data Structures - Review
Dynamic Sets (III, Introduction)
Cs212: Data Structures Computer Science Department Lecture 7: Queues.
Advanced Data Structures & AlgoRithm
PAC Intro to “big o” Lists Professor: Evan Korth New York University
Data Structures Website: Lectures: Haim Kaplan and Uri Zwick
Recall What is a Data Structure Very Fundamental Data Structures
Professional Elective-I Advanced Data Structure
Algorithm Design and Analysis
Introduction to Data Structure
Binary SearchTrees [CLRS] – Chap 12.
Stacks, Queues, and Deques
Fibonacci Heaps & Doubled-Ended Heap Structures
CSCE156: Introduction to Computer Science II
structures and their relationships." - Linus Torvalds
Data Structures and Algorithms Lecture-1: Introduction
Advanced Analysis of Algorithms
Abstract Data Types (ADTs)
Presentation transcript:

Data Structures - Review [CLRS] – Chap 10, Chap 11, Chap 6.5 [CLRS] = Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein, Introduction to Algorithms, 3rd Ed, MIT Press, 2009.

Data Structures Program = Algorithm + Data Structures The design of an algorithm must be based on the understanding of data structure techniques and costs Abstract Data Type: Defined by the list of supported operations Hides the implementation details of these operations

Dynamic Sets Collections of data manipulated by algorithms; can grow, shrink or change over time Operations on dynamic sets: S=a dynamic set Search (S, k) Insert (S, x) Delete (S, x) Minimum (S) Maximum(S) Successor(S, x) Predecessor(S, x)

Implementing Dynamic Sets The best way to implement a dynamic set is determined by the subset of operations that must be supported ! There are particular types of Dynamic Sets, determined by certain frequent occuring subsets of operations: The Fundamental Data Structures Each data structure addresses comes with a purpose: it addresses a particular usage context that requires a particular subset of operations

Fundamental Data Structures Stacks: Insert (Push), Delete (Pop) Implemented by Lists; O(1), O(1) Queues: Insert (Enqueue), Delete (Dequeue) Priority Queues: see for review [CLRS chap 6.5] Insert, Maximum, ExtractMax, IncreaseKey Implemented by Heaps; O(log n), O(1), O(log n), O(log n) Dictionaries: Insert, Search, Delete Implemented by Hashtables: see for review [CLRS chap 11] Generalizes the simple arrays, allows direct addressing of arbitrary positions in O(1) Hashing with chaining; Hashing with open addressing

Libraries Implementing Fundamental Data Structures There are standard libraries implementing the fundamental data structures for most languages It is recommended to use these implementations instead of redoing your own ! BUT: in order to use them correct and appropriate, don’t forget anything that you learned about fundamental data structures ! Java: Collections https://docs.oracle.com/javase/tutorial/collections/TOC.html C++: STL Containers http://www.cplusplus.com/reference/stl/ C#: System.Collections https://msdn.microsoft.com/en-US/library/system.collections%28v=vs.110%29.aspx

Fundamental Data Structures - Java Class java.util.Stack Interface java.util.Queue General purpose (not for concurrent use) queue implementation: class java.util.LinkedList Interface java.util.Deque General purpose implementations: classes java.util.ArrayDeque, java.util.LinkedList Class java.util.PriorityQueue Implements an unbounded priority queue based on a Heap. Class java.util.HashSet Class java.util.HashMap