Data Structures. A Pseudocode Approach with С. Richard F. Gilberg De Anza College. Behrouz A. Forouzan De Anza College I(T)P. PWS Publishing Company

Size: px
Start display at page:

Download "Data Structures. A Pseudocode Approach with С. Richard F. Gilberg De Anza College. Behrouz A. Forouzan De Anza College I(T)P. PWS Publishing Company"

Transcription

1 Data Structures A Pseudocode Approach with С Richard F. Gilberg De Anza College Behrouz A. Forouzan De Anza College PWS Publishing Company I(T)P An International Thomson Publishing Company Boston 'Albany 'Bonn 'Cincinnati 'London 'Madrid Melbourne Mexico City New York Paris San Francisco Singapore «Tokyo -Toronto -Washington

2 Co ntents Preface хш. 1 Introduction Pseudocode 2 Algorithm Header 2 Purpose, Conditions, and Return 3 Statement Numbers 4 Variables 4 Algorithm Analysis 5 Statement Constructs 5 Sequence 5 Selection 6 Loop 6 Pseudocode Example The Abstract Data Type 7 Atomic and Composite Data 8 Data Structure 9 Abstract Data Type A Model For An Abstract Data Type 11 ADT Operations 12 ADT Data Structure Algorithm Efficiency 12 Linear Loops 14 Logarithmic Loops 14 Nested Loops 15 Linear Logarithmic 15 Dependent Quadratic 16 Quadratic 16 Big-O Notation 17 Standard Measures of Efficiency 18 Big-O Analysis Examples 19 Add Matrices 19 Multiply Matrices Summary 22 Practice Sets 23 Exercises 23 Problems 25 Projects 25 2 Searching Linear List Searches 28 Sequential Search 28 Sequential Search Algorithm 28 Variations on Sequential Searches 31 Sentinel Search 31 Probability Search 32 Ordered List Search 33 Binary Search 34 Target Found 34 Target Not Found 35 Binary Search Algorithm 37 Analyzing Linear Search Algorithms 38 Sequential Search 38 Binary Search 39 Linear Search С Algorithms 40 Sequential Search In С 40 Binary Search In С 41 Hashed List Searches 42 Basic Concepts 43 Hashing Methods 44 Direct Method 44 Subtraction Method 46 Modulo-Division Method 46 Digit-Extraction Method 47 Midsquare Method 47 V

3 vi Contents Folding Methods 48 Rotation Method 48 Pseudorandom Method 50 Hashing Algorithm Collision Resolution 51 Open Addressing 53 Linear Probe 54 Quadratic Probe 55 Pseudorandom Collision Resolution 55 Key Offset 56 Linked List Resolution 57 Bucket Hashing 58 Combination Approaches Summary Practice Sets 61 Exercises 61 Problems 62 Projects 63 3 Linear Lists Linear List Concepts 66 Insertion 67 Deletion 67 Retrieval 68 Traversal Linked Lists 69 Nodes 69 Linked List Data Structure 70 Head Node Structure 71 Data Node Structure 71 Pointers to Linked Lists Linked List Algorithms 72 Create List 74 Insert Node 76 Insert Into Empty List 76 Insert at Beginning 77 Insert in Middle 77 Insert at End 79 Insert Node Algorithm 79 Delete Node 79 Delete First Node 81 General Delete Case 82 Delete Node Algorithm 83 Search List 84 Retrieve Node 87 Empty List 87 Full List 88 List Count 88 Traverse List 89 Destroy List Processing A Linked List 91 Add Node 93 Remove Node 94 Print List 95 Testing Insert and Delete Logic Linear List Applications 97 Append Linked Lists 97 Array of Linked Lists Complex Linked List Structures 102 Header Nodes 102 Circularly-Linked Lists 103 Doubly-Linked Lists 104 Doubly-Linked List Insertion 105 Doubly-Linked List Deletion 109 Multilinked Lists 110 Multilinked List Insert 112 Multilinked List Delete Building A Linked List С Implementation 114 Data Structure 114 Application Functions 115 Main 115 Instructions 115 Build List 116 Compare Data 117 Process User Requests 118 Get User's Choice 119 Print List 120 Search List Linked List Abstract Data Type 122 List ADT Functions 123 Create List 124 Add Node 125 Insert Node 126 Remove Node 128 Delete Node 128 Search List 129 Internal Search Function 129 Retrieve Node 132 Empty List 133 Full List 133 List Count 134 Traverse 134 Destroy List 136

4 Contents vii 3-9 Summary Ю Practice Sets 137 Exercises 137 Problems 140 Projects Stacks Basic Stack Operations 150 Push 150 Pop 150 Stack Top Stack Linked-List Implementation 153 Data Structure 153 Stack Head 153 Stack Data Node 153 Stack Algorithms 153 Create Stack 157 Push Stack 158 Pop Stack 159 Stack Top 160 Empty Stack 161 Full Stack 161 Stack Count 162 Destroy Stack Stack Applications 163 Reversing Data 163 Reverse a List 164 Convert Decimal to Binary 164 Parsing 165 Postponement 167 Infix To Postfix Transformation 167 Evaluating Postfix Expressions 1 73 Backtracking 175 Goal Seeking 175 Eight Queens Problem Eight Queens Problem С Implementation 181 Mainline Logic 182 Get Board Size 183 Fill Board 183 Guarded 185 Print Board ADT Linked-List Implementation 188 Data Structure 188 Stack ADT Implementation 188 Stack Structure 188 Create Stack 190 Push Stack 190 Pop Stack 192 Stack Top 193 Empty Stack 193 Full Stack 194 Stack Count 194 Destroy Stack Array Implementation of Stacks 196 Data Structures 196 Array Algorithms 197 Create Stack 197 Push Stack 198 Pop Stack 198 Stack Top 199 Empty Stack 200 Full Stack 200 Stack Count 201 Destroy Stack ADT Array Implementation 202 Create Stack Array 202 Push Stack Array 203 Pop Stack Array 204 Stack Top Array 205 Empty Stack Array 205 Full Stack Array 206 Stack Count Array 206 Destroy Stack Array Summary Practice Sets 208 Exercises 208 Problems 209 Projects Queues Queue Operations 216 Enqueue 216 Dequeue 216 Queue Front 217 Queue Rear 217 Queue Example Queue Linked-List Implementation 218 Data Structure 218 Queue Head 218 Queue Data Node 220 Queue Algorithms 220

5 viii Contents Create Queue 223 Enqueue 224 Dequeue 225 Retrieving Queue Data 226 Empty Queue 227 Full Queue 227 Queue Count 228 Destroy Queue Queuing Theory Queue Applications 230 Queue Simulation 231 Events 231 Data Structures 232 Output 233 Simulation Algorithm 233 Categorizing Data Categorizing Data С Implementation 240 Mainline Logic 240 FillQueues 241 Print Queues 242 Print One Queue Queue Linked-List Implementation 244 Queue Structure 244 Queue ADT Implementation 245 Create Queue 245 Enqueue 246 Dequeue 247 Queue Front 248 Queue Rear 249 Queue Empty 249 Full Queue 250 Queue Count 250 Destroy Queue Queues Array Implementation 252 Array Queues Implementation 253 Create Queue Array 255 Enqueue: Array Implementation 256 Dequeue: Array Implementation 257 Queue Front: Array Implementation 258 Queue Rear: Array Implementation 259 Full Queue: Array Implementation 259 Destroy Queue: Array Implementation Summary Practice Sets 261 Exercises 261 Problems 263 Projects Recursion Factorial A Case Study 270 Recursion Defined 270 Iterative Solution 271 Recursive Solution How Recursion Works Designing Recursive Algorithms 275 The Design Methodology 276 Limitations of Recursion 277 Design Implementation Reverse A Linked List Another Case Study Fibonacci Numbers The Towers Of Hanoi 282 Recursive Towers Of Hanoi С Implementations of Recursion 288 Fibonacci Numbers 288 Towers of Hanoi Summary Practice Sets 292 Exercises 292 Problems 294 Projects Introduction to Trees Basic Tree Concepts 298 Terminology 298 Tree Representation Binary Trees 302 Properties 304 Height of Binary Trees 304 Balance 304 Complete Binary Trees 305 Binary Tree Structure Binary Tree Traversais 306 Depth-First Traversals 306

6 Contents ix Preorder Traversal (NbR) 307 Inorder Traversal (LNR) 309 Postorder Traversal (LRN) 310 Breadth Traversal Expression Trees 313 Infix Traversal 313 Postfix Traversal 316 Prefix Traversal General Trees 316 Changing General Tree To Binary Tree 317 Insertions Into General Trees 318 FIFO Insertion 318 LIFO Insertion 318 Key Sequenced Insertion 318 General Tree Deletions Summary Practice Sets 321 Exercises 321 Problems 325 Projects Search Trees Binary Search Trees 334 Definition 334 Operations On Binary Search Trees 336 Binary Search Tree Traversals 336 Binary Search Tree Search Algorithms 337 Insert Node AVL Trees 348 AVL Balance Factor 349 Balancing Trees 350 Case 1: Left Of Left 352 Case 2: Right Of Right 353 Case 3: Right Of Left 354 Case 4: Left Of Right 354 AVL Node Structure 354 AVL Insert 355 AVL Insert Algorithm 358 AVL Left Balance Algorithm 359 Rotate Algorithms 360 AVL Delete Algorithm 361 Delete Right Balance 363 Adjusting The Balance Factors AVL Abstract Data Type 366 AVL Data Structure 368 AVL Algorithms 369 Create AVL Tree 369 AVL Tree Insert 370 AVL Tree Delete 376 AVL Tree Data Processing 382 Retrieve AVL Tree Node 382 Traverse AVL Tree 384 AVL Tree Utility Functions 384 AVL Empty Tree 385 AVL Full Tree 385 AVL Count 385 Destroy AVL Tree Summary Practice Sets 388 Exercises 388 Problems 390 Projects Heaps Heap Definition Heap Structure Basic Heap Algorithms 397 ReheapUp 398 ReheapDown Heap Data Structure Heap Algorithms 403 ReheapUp 403 ReheapDown 404 Build Heap 405 Insert Heap 406 Delete Heap Heap Applications 410 Selection Algorithms 410 Priority Queues A Heap Program 413 Heap Program Design 413 Heap Functions 419 ReheapUp 419 ReheapDown 420 Insert Heap 421 Delete Heap Node Summary Practice Sets 423 Exercises 423 Problems 425 Projects 425

7 X Contents 10 Multiway Trees 429 lo-l М-Way Search Trees B-Trees 431 B-Tree Insertion 433 B-Tree Insert Design 434 B-Tree Insert Node 436 Search Node 438 Split Node 439 Insert Entry 442 Insertion Summary 442 B-Tree Deletion 442 B-Tree Delete 445 Node Delete 445 Delete Entry 447 Delete Mid 447 ReFlow 448 Balance 451 Combine 453 Traverse B-Tree 455 B-Tree Search Simplified B-Trees Tree Tree B-tree Variations 461 B*Tree 461 В + Tree Lexical Search Tree 461 Tries 463 Trie Structure 464 Trie Search B-Tree Abstract Data Type 466 Header File 466 Utility Functions 468 Search 468 Traversal 470 Insert Algorithms 472 ADT Interface Function 472 Internal Insert Processing 474 Delete Algorithms 478 ADT Delete Interface 478 Delete Internal Function 479 Delete Middle 481 Reflow Function 482 Borrow Left or Right 484 Combine Summary Practice Sets 487 Exercises 487 Problems 487 Projects Advanced Sorting Concepts General Sort Concepts 492 Sort Order 492 Sort Stability 493 Sort Efficiency 494 Passes Insertion Sorts 494 Straight Insertion Sort 494 Straight Insertion Sort Example 494 Insertion Sort Algorithm 495 Shell Sort 497 Shell Sort Algorithm 497 Selecting the Increment Size 501 Insertion Sort Algorithmics 501 Straight Insertion Sort 501 Shell Sort 502 Summary 503 Insertion Sort Implementation 503 Straight Insertion Sort 503 Shell Sort Selection Sorts 506 Straight Selection Sort 506 Selection Sort Algorithm 506 Heap Sort 508 Heap Sort Algorithm 509 Selection Sort Algorithmics 510 Straight Selection Sort 510 Heap Sort 510 Summary 512 Selection Sort Implementation 513 Selection Sort С Code 513 Heap Sort С Code Exchange Sorts 514 Bubble Sort 515 Bubble Sort Algorithm 515 Quicksort 517 Quick Sort Algorithm 519 Exchange Sort Algorithmics 524 Bubble Sort 524 Quick Sort 525 Summary 526

8 Contents xi Exchange Sort Implementation 526 Bubble Sort Code 526 Quick Sort Code External Sorts 530 Merging Ordered Files 530 Merging Unordered Files 532 The Sorting Process 533 Natural Merge 535 Balanced Merge 535 Polyphase Merge 535 Sort Phase Revisited Summary Practice Sets 542 Exercises 542 Problems 544 Projects Graphs Terminology Operations 552 Add Vertex 552 Delete Vertex 552 Add Edge 553 Delete Edge 553 Find Vertex 553 Traverse Graph 553 Depth-First Traversal 554 Breadth-First Graph Storage Structures 557 Adjacency Matrix 557 Adjacency List Graph Algorithms 559 Create Graph 563 Insert Vertex 563 Delete Vertex 565 Insert Arc 566 Delete Arc 567 Retrieve Vertex 569 First Arc 569 Depth-First Traversal 570 Breadth-First Traversal Networks 574 Minimum Spanning Tree 575 Minimum Spanning Tree Example 576 Minimum Spanning Tree Data Structure 577 Minimum Spanning Tree Pseudocode 578 Shortest Path Algorithm 580 Shortest Path Manual Example 580 Shortest Path Data Structure 582 Shortest Path Pseudocode Abstract Data Type 584 Insert Vertex 586 Delete Vertex 587 Insert Arc 589 Delete Arc 590 Depth-First Traversal 592 Breadth-First Traversal Summary Practice Sets 597 Exercises 597 Problems 598 Projects 599 Appendix A ASCII Tables 603 A-l ASCII Codes (Long Form) 603 A-2 ASCII Table (Short Form) 607 Appendix В Structure Charts 609 B-l Structure Chart Symbols 610 Modules 610 Reading Structure Charts 612 Common Modules 612 Conditional Calls 613 Exclusive Or 613 Loops 613 Conditional Loops 614 Recursion 614 Data Flows and Flags 615 B-2 Structure Chart Rules 615 Appendix С Program Standards and Styles 617 C-l Global Area 618 C-2 Program Main Line 619 C-3 General Coding Standards 619

9 xii Contents C-4 Variables and Structures 620 C-5 Function Definition 621 Appendix D Random Numbers 623 D-l Random Numbers In С 624 Srand 624 Rand 624 D-2 Custom Random Number Generator 624 D-3 Scaling a Random Number 625 Appendix E Standard С Libraries 629 Б-l Limits.H 629 E-2 Float.H 630 Appendix F С Function Prototypes 631 F-l Function Index 632 F-2 Character Library 633 F-3 Math Library 633 F-4 Standard I/O Library 634 General I/O 634 Formatted I/O 634 Character I/O 634 File I/O 635 System Communication 635 String I/O 635 System File Control 635 F-5 Standard Library 635 Math Functions 635 Memory Functions 635 Program Control 636 System Communication 636 Conversion Functions 636 F-6 String Library 636 Copying Data 636 Comparing Data 636 String Lengths 636 F-7 Time 637 Solutions to Selected Exercises 639 Glossary 655 Index 665

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

More information

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

More information

Java Software Structures

Java Software Structures INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition

More information

Data Structure [Question Bank]

Data Structure [Question Bank] Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC QUESTION BANK PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

More information

10CS35: Data Structures Using C

10CS35: Data Structures Using C CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

More information

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704) GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,

More information

Questions 1 through 25 are worth 2 points each. Choose one best answer for each.

Questions 1 through 25 are worth 2 points each. Choose one best answer for each. Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in

More information

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes. 1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The

More information

Exam study sheet for CS2711. List of topics

Exam study sheet for CS2711. List of topics Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure

More information

AP Computer Science AB Syllabus 1

AP Computer Science AB Syllabus 1 AP Computer Science AB Syllabus 1 Course Resources Java Software Solutions for AP Computer Science, J. Lewis, W. Loftus, and C. Cocking, First Edition, 2004, Prentice Hall. Video: Sorting Out Sorting,

More information

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

More information

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,

More information

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. 1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated

More information

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY A PATH FOR HORIZING YOUR INNOVATIVE WORK A REVIEW ON THE USAGE OF OLD AND NEW DATA STRUCTURE ARRAYS, LINKED LIST, STACK,

More information

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92. Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

More information

Data Structures. Level 6 C30151. www.fetac.ie. Module Descriptor

Data Structures. Level 6 C30151. www.fetac.ie. Module Descriptor The Further Education and Training Awards Council (FETAC) was set up as a statutory body on 11 June 2001 by the Minister for Education and Science. Under the Qualifications (Education & Training) Act,

More information

Converting a Number from Decimal to Binary

Converting a Number from Decimal to Binary Converting a Number from Decimal to Binary Convert nonnegative integer in decimal format (base 10) into equivalent binary number (base 2) Rightmost bit of x Remainder of x after division by two Recursive

More information

To My Parents -Laxmi and Modaiah. To My Family Members. To My Friends. To IIT Bombay. To All Hard Workers

To My Parents -Laxmi and Modaiah. To My Family Members. To My Friends. To IIT Bombay. To All Hard Workers To My Parents -Laxmi and Modaiah To My Family Members To My Friends To IIT Bombay To All Hard Workers Copyright 2010 by CareerMonk.com All rights reserved. Designed by Narasimha Karumanchi Printed in

More information

Atmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1

Atmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1 Data Structure By Ajay Raiyani Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1 Linked List 4 Singly Linked List...4 Doubly Linked List...7 Explain Doubly Linked list: -...7 Circular Singly Linked

More information

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Data Structures Using C++ 2E. Chapter 5 Linked Lists Data Structures Using C++ 2E Chapter 5 Linked Lists Doubly Linked Lists Traversed in either direction Typical operations Initialize the list Destroy the list Determine if list empty Search list for a given

More information

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) -----------------------------------------

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) ----------------------------------------- =============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com

More information

Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

More information

Chapter 3: Restricted Structures Page 1

Chapter 3: Restricted Structures Page 1 Chapter 3: Restricted Structures Page 1 1 2 3 4 5 6 7 8 9 10 Restricted Structures Chapter 3 Overview Of Restricted Structures The two most commonly used restricted structures are Stack and Queue Both

More information

Ordered Lists and Binary Trees

Ordered Lists and Binary Trees Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:

More information

CHAPTER 4 ESSENTIAL DATA STRUCTRURES

CHAPTER 4 ESSENTIAL DATA STRUCTRURES CHAPTER 4 ESSENTIAL DATA STRUCTURES 72 CHAPTER 4 ESSENTIAL DATA STRUCTRURES In every algorithm, there is a need to store data. Ranging from storing a single value in a single variable, to more complex

More information

Binary Search Trees CMPSC 122

Binary Search Trees CMPSC 122 Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than

More information

Binary Heap Algorithms

Binary Heap Algorithms CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell

More information

ML for the Working Programmer

ML for the Working Programmer ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2

More information

Module 2 Stacks and Queues: Abstract Data Types

Module 2 Stacks and Queues: Abstract Data Types Module 2 Stacks and Queues: Abstract Data Types A stack is one of the most important and useful non-primitive linear data structure in computer science. It is an ordered collection of items into which

More information

Lab Manual. Data Structures (Pr): COT-213 Data Structures (P): IT-215

Lab Manual. Data Structures (Pr): COT-213 Data Structures (P): IT-215 Lab Manual Data Structures (Pr): COT-213 Data Structures (P): IT-215 !" #$%&'() * +, -. 951/6201617535973417*37311 235678976: ;7A

More information

CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues. Linda Shapiro Spring 2016

CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues. Linda Shapiro Spring 2016 CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues Linda Shapiro Registration We have 180 students registered and others who want to get in. If you re thinking of dropping

More information

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used

More information

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

Common Data Structures

Common Data Structures Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees

More information

Data Structures UNIT III. Model Question Answer

Data Structures UNIT III. Model Question Answer Data Structures UNIT III Model Question Answer Q.1. Define Stack? What are the different primitive operations on Stack? Ans: Stack: A stack is a linear structure in which items may be added or removed

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms CS245-2016S-06 Binary Search Trees David Galles Department of Computer Science University of San Francisco 06-0: Ordered List ADT Operations: Insert an element in the list

More information

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards Course Title: TeenCoder: Java Programming Course ISBN: 978 0 9887070 2 3 Course Year: 2015 Note: Citation(s) listed may represent

More information

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types EECS 281: Data Structures and Algorithms The Foundation: Data Structures and Abstract Data Types Computer science is the science of abstraction. Abstract Data Type Abstraction of a data structure on that

More information

Unit 1. 5. Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]

Unit 1. 5. Write iterative and recursive C functions to find the greatest common divisor of two integers. [6] Unit 1 1. Write the following statements in C : [4] Print the address of a float variable P. Declare and initialize an array to four characters a,b,c,d. 2. Declare a pointer to a function f which accepts

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

2) What is the structure of an organization? Explain how IT support at different organizational levels.

2) What is the structure of an organization? Explain how IT support at different organizational levels. (PGDIT 01) Paper - I : BASICS OF INFORMATION TECHNOLOGY 1) What is an information technology? Why you need to know about IT. 2) What is the structure of an organization? Explain how IT support at different

More information

An Introduction to Programming and Computer Science

An Introduction to Programming and Computer Science An Introduction to Programming and Computer Science Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts Copyright 1998 by

More information

Unordered Linked Lists

Unordered Linked Lists Unordered Linked Lists Derive class unorderedlinkedlist from the abstract class linkedlisttype Implement the operations search, insertfirst, insertlast, deletenode See code on page 292 Defines an unordered

More information

BCS2B02: OOP Concepts and Data Structures Using C++

BCS2B02: OOP Concepts and Data Structures Using C++ SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal

More information

Heaps & Priority Queues in the C++ STL 2-3 Trees

Heaps & Priority Queues in the C++ STL 2-3 Trees Heaps & Priority Queues in the C++ STL 2-3 Trees CS 3 Data Structures and Algorithms Lecture Slides Friday, April 7, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks

More information

Algorithms and data structures

Algorithms and data structures Algorithms and data structures This course will examine various data structures for storing and accessing information together with relationships between the items being stored, and algorithms for efficiently

More information

Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010

Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010 Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010 Problem 1. In each of the following question, please specify if the statement

More information

Data Structures Using C++

Data Structures Using C++ Data Structures Using C++ 1.1 Introduction Data structure is an implementation of an abstract data type having its own set of data elements along with functions to perform operations on that data. Arrays

More information

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Programming System Design. CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

International Journal of Software and Web Sciences (IJSWS) www.iasir.net

International Journal of Software and Web Sciences (IJSWS) www.iasir.net International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International

More information

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

More information

Pseudo code Tutorial and Exercises Teacher s Version

Pseudo code Tutorial and Exercises Teacher s Version Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

More information

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)

Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2) Sorting revisited How did we use a binary search tree to sort an array of elements? Tree Sort Algorithm Given: An array of elements to sort 1. Build a binary search tree out of the elements 2. Traverse

More information

University of Pune Revised Structure for the B. Sc. (Computer Science) Course (Second Year to be implemented from Academic Year 2014-2015)

University of Pune Revised Structure for the B. Sc. (Computer Science) Course (Second Year to be implemented from Academic Year 2014-2015) University of Pune Revised Structure for the B. Sc. (Computer Science) Course (Second Year to be implemented from Academic Year 2014-2015) S. Y. B. Sc. (Computer Science) No Paper Title: Semester I Title:

More information

Bangalore University B.Sc Computer Science Syllabus ( Semester System)

Bangalore University B.Sc Computer Science Syllabus ( Semester System) Bangalore University B.Sc Computer Science Syllabus ( Semester System) First Semester CSIT1: Computer Fundamentals and C Programming CSIP1: C Programming Lab Second Semester CSIIT1: Data Structures and

More information

Data Structures and Algorithms Stacks and Queues

Data Structures and Algorithms Stacks and Queues Data Structures and Algorithms Stacks and Queues Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/23 6-0: Stacks and

More information

Any two nodes which are connected by an edge in a graph are called adjacent node.

Any two nodes which are connected by an edge in a graph are called adjacent node. . iscuss following. Graph graph G consist of a non empty set V called the set of nodes (points, vertices) of the graph, a set which is the set of edges and a mapping from the set of edges to a set of pairs

More information

Curriculum Map. Discipline: Computer Science Course: C++

Curriculum Map. Discipline: Computer Science Course: C++ Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code

More information

Introduction to Data Structures and Algorithms

Introduction to Data Structures and Algorithms Introduction to Data Structures and Algorithms Chapter: Elementary Data Structures(1) Lehrstuhl Informatik 7 (Prof. Dr.-Ing. Reinhard German) Martensstraße 3, 91058 Erlangen Overview on simple data structures

More information

- Easy to insert & delete in O(1) time - Don t need to estimate total memory needed. - Hard to search in less than O(n) time

- Easy to insert & delete in O(1) time - Don t need to estimate total memory needed. - Hard to search in less than O(n) time Skip Lists CMSC 420 Linked Lists Benefits & Drawbacks Benefits: - Easy to insert & delete in O(1) time - Don t need to estimate total memory needed Drawbacks: - Hard to search in less than O(n) time (binary

More information

Data Structures and Data Manipulation

Data Structures and Data Manipulation Data Structures and Data Manipulation What the Specification Says: Explain how static data structures may be used to implement dynamic data structures; Describe algorithms for the insertion, retrieval

More information

Data Structure with C

Data Structure with C Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 13-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 13-1 Slide 13-1 Chapter 13 Disk Storage, Basic File Structures, and Hashing Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and Extendible

More information

Chapter 8: Structures for Files. Truong Quynh Chi tqchi@cse.hcmut.edu.vn. Spring- 2013

Chapter 8: Structures for Files. Truong Quynh Chi tqchi@cse.hcmut.edu.vn. Spring- 2013 Chapter 8: Data Storage, Indexing Structures for Files Truong Quynh Chi tqchi@cse.hcmut.edu.vn Spring- 2013 Overview of Database Design Process 2 Outline Data Storage Disk Storage Devices Files of Records

More information

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

Chapter 13 Disk Storage, Basic File Structures, and Hashing. Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright 2004 Pearson Education, Inc. Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files

More information

Chapter 13. Disk Storage, Basic File Structures, and Hashing

Chapter 13. Disk Storage, Basic File Structures, and Hashing Chapter 13 Disk Storage, Basic File Structures, and Hashing Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and Extendible Hashing

More information

The following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).

The following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2). CHAPTER 5 The Tree Data Model There are many situations in which information has a hierarchical or nested structure like that found in family trees or organization charts. The abstraction that models hierarchical

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

The Elective Part of the NSS ICT Curriculum D. Software Development

The Elective Part of the NSS ICT Curriculum D. Software Development of the NSS ICT Curriculum D. Software Development Mr. CHEUNG Wah-sang / Mr. WONG Wing-hong, Robert Member of CDC HKEAA Committee on ICT (Senior Secondary) 1 D. Software Development The concepts / skills

More information

Linked Lists, Stacks, Queues, Deques. It s time for a chainge!

Linked Lists, Stacks, Queues, Deques. It s time for a chainge! Linked Lists, Stacks, Queues, Deques It s time for a chainge! Learning Goals After this unit, you should be able to... Differentiate an abstraction from an implementation. Define and give examples of problems

More information

EE2204 DATA STRUCTURES AND ALGORITHM (Common to EEE, EIE & ICE)

EE2204 DATA STRUCTURES AND ALGORITHM (Common to EEE, EIE & ICE) EE2204 DATA STRUCTURES AND ALGORITHM (Common to EEE, EIE & ICE) UNIT I LINEAR STRUCTURES Abstract Data Types (ADT) List ADT array-based implementation linked list implementation cursor-based linked lists

More information

Lecture 1: Data Storage & Index

Lecture 1: Data Storage & Index Lecture 1: Data Storage & Index R&G Chapter 8-11 Concurrency control Query Execution and Optimization Relational Operators File & Access Methods Buffer Management Disk Space Management Recovery Manager

More information

Binary Trees and Huffman Encoding Binary Search Trees

Binary Trees and Huffman Encoding Binary Search Trees Binary Trees and Huffman Encoding Binary Search Trees Computer Science E119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Motivation: Maintaining a Sorted Collection of Data A data dictionary

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

Stacks. Linear data structures

Stacks. Linear data structures Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations

More information

Introduction to Data Structures

Introduction to Data Structures Introduction to Data Structures Albert Gural October 28, 2011 1 Introduction When trying to convert from an algorithm to the actual code, one important aspect to consider is how to store and manipulate

More information

Persistent Binary Search Trees

Persistent Binary Search Trees Persistent Binary Search Trees Datastructures, UvA. May 30, 2008 0440949, Andreas van Cranenburgh Abstract A persistent binary tree allows access to all previous versions of the tree. This paper presents

More information

Class Overview. CSE 326: Data Structures. Goals. Goals. Data Structures. Goals. Introduction

Class Overview. CSE 326: Data Structures. Goals. Goals. Data Structures. Goals. Introduction Class Overview CSE 326: Data Structures Introduction Introduction to many of the basic data structures used in computer software Understand the data structures Analyze the algorithms that use them Know

More information

Chapter 13: Query Processing. Basic Steps in Query Processing

Chapter 13: Query Processing. Basic Steps in Query Processing Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing

More information

Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

More information

Data Structures and Algorithms V22.0102. Otávio Braga

Data Structures and Algorithms V22.0102. Otávio Braga Data Structures and Algorithms V22.0102 Otávio Braga We use a stack When an operand is read, output it When an operator is read Pop until the top of the stack has an element of lower precedence Then push

More information

Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

More information

Computer Organization

Computer Organization Computer Organization and Architecture Designing for Performance Ninth Edition William Stallings International Edition contributions by R. Mohan National Institute of Technology, Tiruchirappalli PEARSON

More information

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical

More information

Algorithms and Data S tructures Structures Stack, Queues, and Applications Applications Ulf Leser

Algorithms and Data S tructures Structures Stack, Queues, and Applications Applications Ulf Leser Algorithms and Data Structures Stack, Queues, and Applications Ulf Leser Content of this Lecture Stacks and Queues Tree Traversal Towers of Hanoi Ulf Leser: Alg&DS, Summer semester 2011 2 Stacks and Queues

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING LESSON PLAN ERODE SENGUNTHAR ENGINEERING COLLEGE (Approved by AICTE, New Delhi, Permanently Affiliated to Anna University - Chennai & Accredited by NAAC & National Board of Accreditation (NBA), New Delhi, Accredited

More information

Application of Stacks: Postfix Expressions Calculator (cont d.)

Application of Stacks: Postfix Expressions Calculator (cont d.) Application of Stacks: Postfix Expressions Calculator (cont d.) Postfix expression: 6 3 + 2 * = FIGURE 7-15 Evaluating the postfix expression: 6 3 + 2 * = Data Structures Using C++ 2E 1 Application of

More information

Exercises Software Development I. 11 Recursion, Binary (Search) Trees. Towers of Hanoi // Tree Traversal. January 16, 2013

Exercises Software Development I. 11 Recursion, Binary (Search) Trees. Towers of Hanoi // Tree Traversal. January 16, 2013 Exercises Software Development I 11 Recursion, Binary (Search) Trees Towers of Hanoi // Tree Traversal January 16, 2013 Software Development I Winter term 2012/2013 Institute for Pervasive Computing Johannes

More information

ECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 2008-10-23/5:15-6:45 REC-200, EVI-350, RCH-106, HH-139

ECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 2008-10-23/5:15-6:45 REC-200, EVI-350, RCH-106, HH-139 ECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 2008-10-23/5:15-6:45 REC-200, EVI-350, RCH-106, HH-139 Instructions: No aides. Turn off all electronic media and store them under your desk. If

More information

Syllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System

Syllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System Syllabus for Computer Science Proposed scheme for B.Sc Programme under Choice Based Credit System SEMESTER - I Code Course Title Course Type HPW Credits BS106 SEMESTER -I I BS 206 SEMESTER -III BS 301

More information

PROBLEMS (Cap. 4 - Istruzioni macchina)

PROBLEMS (Cap. 4 - Istruzioni macchina) 98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary

More information

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent

More information

Big Data and Scripting. Part 4: Memory Hierarchies

Big Data and Scripting. Part 4: Memory Hierarchies 1, Big Data and Scripting Part 4: Memory Hierarchies 2, Model and Definitions memory size: M machine words total storage (on disk) of N elements (N is very large) disk size unlimited (for our considerations)

More information

A Comparison of Dictionary Implementations

A Comparison of Dictionary Implementations A Comparison of Dictionary Implementations Mark P Neyer April 10, 2009 1 Introduction A common problem in computer science is the representation of a mapping between two sets. A mapping f : A B is a function

More information