Data Structures - Review [CLRS] – Chap 10, Chap 11, Chap 6.5.

Slides:



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

Data Structures.
CS 307 Fundamentals of Computer Science 1 Abstract Data Types many slides taken from Mike Scott, UT Austin.
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.
Copyright © Wondershare Software Introduction to Data Structures Prepared by: Eng. Ahmed & Mohamed Taha.
Data Structures Winter What is a Data Structure? A data structure is a method of organizing data. The study of data structures is particularly important.
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.
Final Exam Review CS Total Points – 60 Points Writing Programs – 50 Points Tracing Algorithms, determining results, and drawing pictures – 50.
Foundation of Computing Systems Lecture 3 Stacks and Queues.
Data Structures for Midterm 2. C++ Data Structure Runtimes.
2 Obaid Ullah HOD Computer Science Dept. Superior University Sialkot Campus.
Lecture 6 Data Structures. Stack top x.
Algorithms and Data Structures Lecture VI
Introduction to Data Structure and Algorithms
FALL 2005CENG 213 Data Structures1 Review. FALL 2005CENG 213 Data Structures2 Collection of items Problems that must manage data by value. Some important.
9/27/2016IT 1791 Abstraction A tool (concept) to manage complexity Hide irrelevant details; focus on the features needed Primitive date types are already.
Final Exam Review CS 3358.
Data Structures and Algorithms
Week 4 - Monday CS221.
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
Chapter 15 Lists Objectives
Programming Abstractions
March 29 – Testing and Priority QUeues
Abstraction A tool (concept) to manage complexity
Chapter 12: Data Structures
Queues Queues Queues.
Data Structures Interview / VIVA Questions and Answers
Data Structures and Database Applications Abstract Data Types
Data Structures and Algorithms
ECET370 Education for Service-- ecet370.com. ECET 370 Entire Course (Devry) For more course tutorials visit ECET 370 Week 1 Lab 1 ECET.
ECET 370 HELPS Education for Service- - ecet370helps.com.
structures and their relationships." - Linus Torvalds
Stacks Linked Lists Queues Heaps Hashes
CSE 326: Data Structures: Midterm Review
Algorithms Part III. Data Structures
structures and their relationships." - Linus Torvalds
Stacks, Queues, and Deques
ITEC 2620M Introduction to Data Structures
Lesson 6. Types Equality and Identity. Collections.
Introduction to Computer Science for Majors II
Priority Queues (Chapter 6.6):
Data Structures - Review
Dynamic Sets (III, Introduction)
Cs212: Data Structures Computer Science Department Lecture 7: Queues.
Recall What is a Data Structure Very Fundamental Data Structures
Introduction to Data Structure
Data Structures - Review
Binary SearchTrees [CLRS] – Chap 12.
Priority Queues (Chapter 6):
Stacks, Queues, and Deques
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
CSCE156: Introduction to Computer Science II
structures and their relationships." - Linus Torvalds
Abstract Data Types (ADTs)
Presentation transcript:

Data Structures - Review [CLRS] – Chap 10, Chap 11, Chap 6.5

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: –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) –Implemented by Lists; O(1), O(1) 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) Hash Tables: see for review [CLRS chap 11] –Insert, Search, Delete –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 – C++: STL Containers – C#: System.Collections – US/library/system.collections%28v=vs.110%29.aspxhttps://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