Course Review for. Cpt S 223 Fall Cpt S 223. School of EECS, WSU

Similar documents
Course Review for Finals. Cpt S 223 Fall 2008

Course Review. Cpt S 223 Fall 2009

Cpt S 223 Fall Cpt S 223. School of EECS, WSU

Course Review. Cpt S 223 Fall 2010

Trees. (Trees) Data Structures and Programming Spring / 28

Binary Trees, Binary Search Trees

Cpt S 122 Data Structures. Course Review Midterm Exam # 1

ECE250: Algorithms and Data Structures Midterm Review

The questions will be short answer, similar to the problems you have done on the homework

Uses for Trees About Trees Binary Trees. Trees. Seth Long. January 31, 2010

CSE 373 APRIL 17 TH TREE BALANCE AND AVL

CS61BL. Lecture 3: Asymptotic Analysis Trees & Tree Traversals Stacks and Queues Binary Search Trees (and other trees)

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Lecture 6: Analysis of Algorithms (CS )

Why Do We Need Trees?

Data Structures. Outline. Introduction Linked Lists Stacks Queues Trees Deitel & Associates, Inc. All rights reserved.

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

Trees. CSE 373 Data Structures

DATA STRUCTURES AND ALGORITHMS. Hierarchical data structures: AVL tree, Bayer tree, Heap

Binary Trees

Midterm solutions. n f 3 (n) = 3

Recursive Data Structures and Grammars

17 February Given an algorithm, compute its running time in terms of O, Ω, and Θ (if any). Usually the big-oh running time is enough.

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree

CS301 - Data Structures Glossary By

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology

Data Structure Advanced

1 Binary trees. 1 Binary search trees. 1 Traversal. 1 Insertion. 1 An empty structure is an empty tree.

Topics. Trees Vojislav Kecman. Which graphs are trees? Terminology. Terminology Trees as Models Some Tree Theorems Applications of Trees CMSC 302

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology

Copyright 1998 by Addison-Wesley Publishing Company 147. Chapter 15. Stacks and Queues

CSCI-401 Examlet #5. Name: Class: Date: True/False Indicate whether the sentence or statement is true or false.

Analysis of Algorithms

Lec 17 April 8. Topics: binary Trees expression trees. (Chapter 5 of text)

Lecture: Analysis of Algorithms (CS )

Data Structures Question Bank Multiple Choice

CE 221 Data Structures and Algorithms

Computational Optimization ISE 407. Lecture 16. Dr. Ted Ralphs

Section 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents

TREES cs2420 Introduction to Algorithms and Data Structures Spring 2015

Cpt S 122 Data Structures. Course Review FINAL. Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University

Trees, Binary Trees, and Binary Search Trees

CSE 373 OCTOBER 11 TH TRAVERSALS AND AVL

CSCE 210/2201 Data Structures and Algorithms. Prof. Amr Goneid

Computer Science 210 Data Structures Siena College Fall Topic Notes: Trees

CSCE 210/2201 Data Structures and Algorithms. Prof. Amr Goneid. Fall 2018

Stacks, Queues and Hierarchical Collections

Trees. Eric McCreath

CS 216 Exam 1 Fall SOLUTION

Trees. R. J. Renka 10/14/2011. Department of Computer Science & Engineering University of North Texas. R. J. Renka Trees

Algorithms in Systems Engineering ISE 172. Lecture 16. Dr. Ted Ralphs

Name CPTR246 Spring '17 (100 total points) Exam 3

Cpt S 223 Course Overview. Cpt S 223, Fall 2007 Copyright: Washington State University

! Tree: set of nodes and directed edges. ! Parent: source node of directed edge. ! Child: terminal node of directed edge

Chapter 4 Trees. Theorem A graph G has a spanning tree if and only if G is connected.

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

University of Waterloo Department of Electrical and Computer Engineering ECE250 Algorithms and Data Structures Fall 2014

Basic Data Structures (Version 7) Name:

Tree. A path is a connected sequence of edges. A tree topology is acyclic there is no loop.

Tree: non-recursive definition. Trees, Binary Search Trees, and Heaps. Tree: recursive definition. Tree: example.

Course goals. exposure to another language. knowledge of specific data structures. impact of DS design & implementation on program performance

Advanced Set Representation Methods

Garbage Collection: recycling unused memory

Stacks, Queues and Hierarchical Collections. 2501ICT Logan

CSCI2100B Data Structures Trees

Cpt S 122 Data Structures. Data Structures Trees

Data Structure Lecture#10: Binary Trees (Chapter 5) U Kang Seoul National University

12 Abstract Data Types

Binary Search Trees. See Section 11.1 of the text.

Algorithms. AVL Tree

Search Trees: BSTs and B-Trees

COSC 2011 Section N. Trees: Terminology and Basic Properties

CSE 332 Spring 2013: Midterm Exam (closed book, closed notes, no calculators)

Search Trees. Undirected graph Directed graph Tree Binary search tree

This examination has 11 pages. Check that you have a complete paper.

Upcoming ACM Events Linux Crash Course Date: Time: Location: Weekly Crack the Coding Interview Date:

Algorithms and Data Structures

Chapter 8: Data Abstractions

4. Trees. 4.1 Preliminaries. 4.2 Binary trees. 4.3 Binary search trees. 4.4 AVL trees. 4.5 Splay trees. 4.6 B-trees. 4. Trees

Trees. Reading: Weiss, Chapter 4. Cpt S 223, Fall 2007 Copyright: Washington State University

Department of Computer Science and Technology

MIDTERM EXAMINATION Spring 2010 CS301- Data Structures

Data Abstractions. National Chiao Tung University Chun-Jen Tsai 05/23/2012

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions.

End-Term Examination Second Semester [MCA] MAY-JUNE 2006

Data Structure. IBPS SO (IT- Officer) Exam 2017

Trees. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Abstract Data Structures IB Computer Science. Content developed by Dartford Grammar School Computer Science Department

Trees Algorhyme by Radia Perlman

Trees. Q: Why study trees? A: Many advance ADTs are implemented using tree-based data structures.

Algorithms. 演算法 Data Structures (focus on Trees)

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

Trees. Introduction & Terminology. February 05, 2018 Cinda Heeren / Geoffrey Tien 1

Topic 14. The BinaryTree ADT

Trees. Trees. CSE 2011 Winter 2007

Programming II (CS300)

3137 Data Structures and Algorithms in C++

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

7.1 Introduction. A (free) tree T is A simple graph such that for every pair of vertices v and w there is a unique path from v to w

Transcription:

Course Review for Midterm Exam 1 Cpt S 223 Fall 2011 1

Midterm Exam 1 When: Friday (10/14) 1:10-2pm Where: in class Closed book, closed notes Comprehensive Material for preparation: Lecture slides & in-class notes Homeworks & program assignments Weiss book 2

Course Overview Introduction to advanced data structures Algorithmic asymptotic analysis Programming data structures Program design based on performance i.e., space and time efficiency 3

Math Review Floors, ceilings, exponents and logarithms: Definitions and manipulations Series: Definitions, manipulations, arithmetic and geometric series closed form Proofs: Know definition, components, and how to use the following Proof by induction Proof by counterexample Proof by contradiction Recursion Know definition and rules Analyze running time of recursive algorithm Tail recursion removal 4

C++ Review Know definitions and how to use the following Class, method, encapsulation Constructor, destructor, accessor, mutator Reference variable (&x) and call by reference Copy constructor, operator overloading, operator= Templates STL for different data structures 5

Asymptotic Analysis Why analyze an algorithm? What do we measure and how do we measure it? Line-by-line analysis of a program Best-case, worst-case and average-case analysis Rate of growth: Definitions and notation (O, Ω, Θ, o, w) Proofs for specific examples Properties of asymptotic notation e.g., symmetry, transpose symmetry, transitivity, etc. Maximum subsequence subproblem 6

Abstract Data Types Lists Operations: Insert, Delete, Search Implementations: vectors, singly-linked lists, double-linked lists, sentinel nodes Analysis of operations for each implementation Stacks (LIFO) Operations: Push, Pop, Top Implementations: linked-list, vector (tradeoffs) Analysis of operations for each implementation Queues (FIFO) Operations: Enqueue, dequeue Implementations: linked-list, vector (tradeoffs) Analysis of operations for each implementation Standard Template Library (STL) Use of vector, list, stack and queue template classes Use of iterators Know all the tradeoffs (in time & space) between all these data structures 7

Trees (in memory) Definitions: general m-way tree, root, leaf, child, parent, ancestor, descendant, path, height, depth Binary tree: Definition, traversals Storing/representation: 1. All children: use array or list 2. Store pointers to only Leftmost child and right sibling sb Tree traversals Inorder, postorder and preorder 8

Search Trees Binary search tree (BST) Definition Operations: Insert, Delete, Search, FindMin, FindMax, traversals Know how to perform these on a BST and show resulting BST Know worst-case and average-case analysis of performance Balanced BST (AVL trees) Definition Operations: Rotations & Cases, Insert, Search, FindMin, FindMax Know how to perform these on an AVL tree and show resulting AVL tree Insertion remember all four cases Try out an example AVL deletion like worked out in the class (non-lazy method) Know worst-case performance STL set and map classes (not in syllabus for Midterm Exam I) Differences How to use them 9

Search Trees for Disks (i.e., secondary storage) B+ trees (Not in syllabus for Midterm Exam I) Definition and properties Input parameters: B, D, K M and L, and how to analytically ll determine their values M is a function of B & K L is a function of B & D Operations: Find, Insert, Delete Know how to perform these on a B+ tree and show resulting B+ tree Know worst-case performance Know how to calculate height of a B+ tree Know how to calculate the number of leaves in a B+ tree 10

Good Luck! 11