Data Structures and Algorithms V Otávio Braga

Size: px
Start display at page:

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

Transcription

1 Data Structures and Algorithms V Otávio Braga

2 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 it When ) is found, pop until we find the matching ( ( has the lowest precedence when in the stack but has the highest precedence when in the input When we reach the end of input, pop until the stack is empty

3 3+4*5/6 Infix to Postfix Conversion Example 1

4 3+4*5/6 Stack: Output: Infix to Postfix Conversion Example 1

5 3+4*5/6 Stack: Output: 3 Infix to Postfix Conversion Example 1

6 3+4*5/6 Stack: + Output: 3 Infix to Postfix Conversion Example 1

7 3+4*5/6 Stack: + Output: 3 4 Infix to Postfix Conversion Example 1

8 3+4*5/6 Stack: + * Output: 3 4 Infix to Postfix Conversion Example 1

9 3+4*5/6 Stack: + * Output: Infix to Postfix Conversion Example 1

10 Example 1 3+4*5/6 Stack: + Output: *

11 Example 1 3+4*5/6 Stack: + / Output: *

12 Example 1 3+4*5/6 Stack: + / Output: * 6

13 Example 1 3+4*5/6 Stack: + Output: * 6 /

14 Example 1 3+4*5/6 Stack: Output: * 6 / + Done!

15 Example 2 (300+23)*(43-21)/(84+7)

16 Example 2 (300+23)*(43-21)/(84+7) Stack: Output:

17 Example 2 (300+23)*(43-21)/(84+7) Stack: ( Output:

18 Example 2 (300+23)*(43-21)/(84+7) Stack: ( Output: 300

19 Example 2 (300+23)*(43-21)/(84+7) Stack: ( + Output: 300

20 Example 2 (300+23)*(43-21)/(84+7) Stack: ( + Output:

21 Example 2 (300+23)*(43-21)/(84+7) Stack: ( Output:

22 Example 2 (300+23)*(43-21)/(84+7) Stack: Output:

23 Example 2 (300+23)*(43-21)/(84+7) Stack: * Output:

24 Example 2 (300+23)*(43-21)/(84+7) Stack: * ( Output:

25 Example 2 (300+23)*(43-21)/(84+7) Stack: * ( Output:

26 Example 2 (300+23)*(43-21)/(84+7) Stack: * ( - Output:

27 Example 2 (300+23)*(43-21)/(84+7) Stack: * ( - Output:

28 Example 2 (300+23)*(43-21)/(84+7) Stack: * ( Output:

29 Example 2 (300+23)*(43-21)/(84+7) Stack: * Output:

30 Example 2 (300+23)*(43-21)/(84+7) Stack: Output: *

31 Example 2 (300+23)*(43-21)/(84+7) Stack: / Output: *

32 Example 2 (300+23)*(43-21)/(84+7) Stack: / ( Output: *

33 Example 2 (300+23)*(43-21)/(84+7) Stack: / ( Output: * 84

34 Example 2 (300+23)*(43-21)/(84+7) Stack: / ( + Output: * 84

35 Example 2 (300+23)*(43-21)/(84+7) Stack: / ( + Output: * 84 7

36 Example 2 (300+23)*(43-21)/(84+7) Stack: / ( Output: *

37 Example 2 (300+23)*(43-21)/(84+7) Stack: / Output: *

38 Example 2 (300+23)*(43-21)/(84+7) Stack: Output: * / Done!

39 Example 3 (4+8)*(6-5)/((3-2)*(2+2))

40 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: Output:

41 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: ( Output:

42 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: ( Output: 4

43 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: ( + Output: 4

44 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: ( + Output: 4 8

45 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: ( Output: 4 8 +

46 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: Output: 4 8 +

47 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * Output: 4 8 +

48 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * ( Output: 4 8 +

49 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * ( Output:

50 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * ( - Output:

51 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * ( - Output:

52 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * ( Output:

53 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: * Output:

54 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: Output: *

55 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / Output: *

56 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( Output: *

57 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( ( Output: *

58 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( ( Output: * 3

59 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( ( - Output: * 3

60 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( ( - Output: * 3 2

61 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( ( Output: * 3 2 -

62 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( Output: * 3 2 -

63 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * Output: * 3 2 -

64 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * ( Output: * 3 2 -

65 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * ( Output: * 3 2-2

66 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * ( + Output: * 3 2-2

67 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * ( + Output: *

68 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * ( Output: *

69 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( * Output: *

70 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / ( Output: * *

71 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: / Output: * *

72 Example 3 (4+8)*(6-5)/((3-2)*(2+2)) Stack: Output: * * / Done!

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

Introduction to Stacks

Introduction to Stacks Introduction to Stacks What is a Stack Stack implementation using array. Stack implementation using linked list. Applications of Stack. What is a Stack? Stack is a data structure in which data is added

More information

7.1 Our Current Model

7.1 Our Current Model Chapter 7 The Stack In this chapter we examine what is arguably the most important abstract data type in computer science, the stack. We will see that the stack ADT and its implementation are very simple.

More information

PSTricks. pst-ode. A PSTricks package for solving initial value problems for sets of Ordinary Differential Equations (ODE), v0.7.

PSTricks. pst-ode. A PSTricks package for solving initial value problems for sets of Ordinary Differential Equations (ODE), v0.7. PSTricks pst-ode A PSTricks package for solving initial value problems for sets of Ordinary Differential Equations (ODE), v0.7 27th March 2014 Package author(s): Alexander Grahn Contents 2 Contents 1 Introduction

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

Stacks. Stacks (and Queues) Stacks. q Stack: what is it? q ADT. q Applications. q Implementation(s) CSCU9A3 1

Stacks. Stacks (and Queues) Stacks. q Stack: what is it? q ADT. q Applications. q Implementation(s) CSCU9A3 1 Stacks (and Queues) 1 Stacks Stack: what is it? ADT Applications Implementation(s) 2 CSCU9A3 1 Stacks and ueues A stack is a very important data structure in computing science. A stack is a seuence of

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

Chapter 5 Instructor's Manual

Chapter 5 Instructor's Manual The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 5 Instructor's Manual Chapter Objectives Chapter 5, A Closer Look at Instruction

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

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

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

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

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

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

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

Outline. Computer Science 331. Stack ADT. Definition of a Stack ADT. Stacks. Parenthesis Matching. Mike Jacobson

Outline. Computer Science 331. Stack ADT. Definition of a Stack ADT. Stacks. Parenthesis Matching. Mike Jacobson Outline Computer Science 1 Stacks Mike Jacobson Department of Computer Science University of Calgary Lecture #12 1 2 Applications Array-Based Linked List-Based 4 Additional Information Mike Jacobson (University

More information

Administrative Issues

Administrative Issues CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois (modified by Yuan Long) Administrative Issues Required Prerequisites CSc 2010 Intro to CSc CSc 2310 Java Programming

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

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

Last not not Last Last Next! Next! Line Line Forms Forms Here Here Last In, First Out Last In, First Out not Last Next! Call stack: Worst line ever!

Last not not Last Last Next! Next! Line Line Forms Forms Here Here Last In, First Out Last In, First Out not Last Next! Call stack: Worst line ever! ECE 551 C++ Programming, Data structures, and Algorithms Abstract Data Type: Stack Last In First Out (LIFO) 1 2 2 1 4 3 1 3 4 Stacks in Programming Worst line ever! 5 3 1 5 Stacks are not useful for waiting

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

Stack & Queue. Darshan Institute of Engineering & Technology. Explain Array in detail. Row major matrix No of Columns = m = u2 b2 + 1

Stack & Queue. Darshan Institute of Engineering & Technology. Explain Array in detail. Row major matrix No of Columns = m = u2 b2 + 1 Stack & Queue Explain Array in detail One Dimensional Array Simplest data structure that makes use of computed address to locate its elements is the onedimensional array or vector; number of memory locations

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

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

Outline. The Stack ADT Applications of Stacks Array-based implementation Growable array-based stack. Stacks 2

Outline. The Stack ADT Applications of Stacks Array-based implementation Growable array-based stack. Stacks 2 Stacks Outline The Stack ADT Applications of Stacks Array-based implementation Growable array-based stack Stacks 2 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure

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

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

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 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

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

LSN 2 Computer Processors

LSN 2 Computer Processors LSN 2 Computer Processors Department of Engineering Technology LSN 2 Computer Processors Microprocessors Design Instruction set Processor organization Processor performance Bandwidth Clock speed LSN 2

More information

Linked Lists Linked Lists, Queues, and Stacks

Linked Lists Linked Lists, Queues, and Stacks Linked Lists Linked Lists, Queues, and Stacks CSE 10: Introduction to C Programming Fall 200 Dynamic data structure Size is not fixed at compile time Each element of a linked list: holds a value points

More information

DATA STRUCTURE - STACK

DATA STRUCTURE - STACK DATA STRUCTURE - STACK http://www.tutorialspoint.com/data_structures_algorithms/stack_algorithm.htm Copyright tutorialspoint.com A stack is an abstract data type ADT, commonly used in most programming

More information

Data Structures/Stacks and Queues

Data Structures/Stacks and Queues Data Structures/Stacks and Queues Data Structures Introduction - Asymptotic Notation - Arrays - List Structures & Iterators Stacks & Queues - Trees - Min & Max Heaps - Graphs Hash Tables - Sets - Tradeoffs

More information

Stacks. Data Structures and Data Types. Collections

Stacks. Data Structures and Data Types. Collections Data Structures and Data Types Data types Set values. Set operations on those values. Some are built in to Java: int, double, char,... Most are not: Complex, Picture, Charge, Stack, Queue, Graph,... Data

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

Compilers I - Chapter 4: Generating Better Code

Compilers I - Chapter 4: Generating Better Code Compilers I - Chapter 4: Generating Better Code Lecturers: Paul Kelly (phjk@doc.ic.ac.uk) Office: room 304, William Penney Building Naranker Dulay (nd@doc.ic.ac.uk) Materials: Office: room 562 Textbook

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

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Cpt S 223. School of EECS, WSU

Cpt S 223. School of EECS, WSU Abstract Data Types 1 Topics Abstract Data Types (ADTs) Some basic ADTs: Lists Stacks Queues 2 Primitive Data Type vs. Abstract Data Types Primitive DT: ADT: programmer progra ammer Interface (API) e.g.,

More information

COMPUTER SCIENCE. Paper 1 (THEORY)

COMPUTER SCIENCE. Paper 1 (THEORY) COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------

More information

Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets

Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets Data Structures and Algorithm Analysis (CSC317) Intro/Review of Data Structures Focus on dynamic sets We ve been talking a lot about efficiency in computing and run time. But thus far mostly ignoring data

More information

Bottom-Up Parsing. An Introductory Example

Bottom-Up Parsing. An Introductory Example Bottom-Up Parsing Bottom-up parsing is more general than top-down parsing Just as efficient Builds on ideas in top-down parsing Bottom-up is the preferred method in practice Reading: Section 4.5 An Introductory

More information

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority) Boolean Expressions, Conditions, Loops, and Enumerations Relational Operators == // true if two values are equivalent!= // true if two values are not equivalent < // true if left value is less than the

More information

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing

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

1 The Java Virtual Machine

1 The Java Virtual Machine 1 The Java Virtual Machine About the Spec Format This document describes the Java virtual machine and the instruction set. In this introduction, each component of the machine is briefly described. This

More information

VISION FINANCIALS. Budget Status (GLS8020) Introduction. Purpose of the Report

VISION FINANCIALS. Budget Status (GLS8020) Introduction. Purpose of the Report VISION FINANCIALS Budget Status (GLS8020) Introduction Purpose of the Report The report displays all Commitment Control ledger amounts (budgeted, associated revenue, pre-encumbrance, encumbrance, expense)

More information

HW3: Programming with stacks

HW3: Programming with stacks HW3: Programming with stacks Due: 12PM, Noon Thursday, September 18 Total: 20pts You may do this assignment with one other student. A team of two members must practice pair programming. Pair programming

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

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

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

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

STACKS,QUEUES, AND LINKED LISTS

STACKS,QUEUES, AND LINKED LISTS STACKS,QUEUES, AND LINKED LISTS Stacks Queues Linked Lists Double-Ended Queues Case Study: A Stock Analysis Applet 1 Stacks Astack is a container of objects that are inserted and removed according to the

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

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc

More information

Chapter Objectives. Chapter 7. Stacks. Various Types of Stacks LIFO. Empty Stack. Stacks

Chapter Objectives. Chapter 7. Stacks. Various Types of Stacks LIFO. Empty Stack. Stacks Chapter Objectives Chapter 7 Stacks Learn about stacks Examine various stack operations Learn how to implement a stack as an array Learn how to implement a stack as a linked list Discover stack applications

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

AFF 808. Sub. Code 4BIT1C1. B.Sc. DEGREE EXAMINATION, NOVEMBER 2015. First Semester. Information Technology

AFF 808. Sub. Code 4BIT1C1. B.Sc. DEGREE EXAMINATION, NOVEMBER 2015. First Semester. Information Technology Ws4 AFF 808 Sub. Code 4BITC B.Sc. DEGREE EXAMINATION, NOVEMBER 05 First Semester Information Technology PRINCIPLES OF INFORMATION TECHNOLOGY AND OS (CBCS 04 onwards) Time : 3 Hours Maximum : 75 Marks Part

More information

Collaboration policy. Where to get help Email (but no code in email) Office hours Lab TAs in Friend 008/009 Bounce ideas (but not code) off classmates

Collaboration policy. Where to get help Email (but no code in email) Office hours Lab TAs in Friend 008/009 Bounce ideas (but not code) off classmates Collaboration policy Programs: Do not use someone else s code unless specifically authorized Exceptions Code from course materials OK [cite source] Coding with partner OK after first assignment [stay tuned]

More information

Overview of Web Request Routing Through Unified ICM

Overview of Web Request Routing Through Unified ICM Example Web Collaboration Scripts, page 1 Example E-mail Scripts, page 7 Universal Queue Scripts, page 11 Example Unified CCE Scripts, page 14 Additional Example Outbound Option Scripts, page 19 Estimated

More information

PROGRAMMING CONCEPTS AND EMBEDDED PROGRAMMING IN C, C++ and JAVA: Lesson-4: Data Structures: Stacks

PROGRAMMING CONCEPTS AND EMBEDDED PROGRAMMING IN C, C++ and JAVA: Lesson-4: Data Structures: Stacks PROGRAMMING CONCEPTS AND EMBEDDED PROGRAMMING IN C, C++ and JAVA: Lesson-4: Data Structures: Stacks 1 STACK A structure with a series of data elements with last sent element waiting for a delete operation.

More information

NM i Automasjon 2014 Project 4:

NM i Automasjon 2014 Project 4: NM i Automasjon 2014 Project 4: Project 4 - Optimizing of Distribution and Turnover station Weighting (Points out of total) 15/100 Maximum time 60 minutes Task: Your task is to optimize a finished production

More information

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP Sruthi Sankar CSE 633: Parallel Algorithms Spring 2014 Professor: Dr. Russ Miller Sudoku: the puzzle A standard Sudoku puzzles contains 81 grids :9 rows

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

An Overview of Stack Architecture and the PSC 1000 Microprocessor

An Overview of Stack Architecture and the PSC 1000 Microprocessor An Overview of Stack Architecture and the PSC 1000 Microprocessor Introduction A stack is an important data handling structure used in computing. Specifically, a stack is a dynamic set of elements in which

More information

Cobra Standard Version 1.0

Cobra Standard Version 1.0 Final, Published February 2015 www.cardlinx.org Work Group Chair: First Data Work Group Participants: Bank of America Cardlytics LivingSocial MasterCard Microsoft Valpak/Cox Target Media 1 Copyright 2015.

More information

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security & BSc. (Hons.) Software Engineering Cohort: BIS/05/FT BCNS/05/FT BSE/05/FT Examinations for 2005-2006 / Semester

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

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

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

PERFORMANCE CRITERIA FOR SOFTWARE METRICS MODEL REFINEMENT

PERFORMANCE CRITERIA FOR SOFTWARE METRICS MODEL REFINEMENT PERFORMANCE CRITERIA FOR SOFTWARE METRICS MODEL REFINEMENT Adrian VISOIU 1 PhD Candidate, Assistant Lecturer, Economic Informatics Department, Academy of Economic Studies, Bucharest, Romania E-mail: adrian.visoiu@csie.ase.ro

More information

Does a Programmer s Activity Indicate Knowledge of Code? Software Engineering Seminar 2010

Does a Programmer s Activity Indicate Knowledge of Code? Software Engineering Seminar 2010 Does a Programmer s Activity Indicate Knowledge of Code? Software Engineering Seminar 2010 Who? From? Jan Rüegg 2007 Paper By Thomas Fritz, University of British Columbia Gail C. Murphy, University of

More information

This lecture. Abstract data types Stacks Queues. ADTs, Stacks, Queues 1. 2004 Goodrich, Tamassia

This lecture. Abstract data types Stacks Queues. ADTs, Stacks, Queues 1. 2004 Goodrich, Tamassia This lecture Abstract data types Stacks Queues ADTs, Stacks, Queues 1 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure An ADT specifies: Data stored Operations

More information

Language Processing Systems

Language Processing Systems Language Processing Systems Evaluation Active sheets 10 % Exercise reports 30 % Midterm Exam 20 % Final Exam 40 % Contact Send e-mail to hamada@u-aizu.ac.jp Course materials at www.u-aizu.ac.jp/~hamada/education.html

More information

Class XII (Theory) C++

Class XII (Theory) C++ Class XII (Theory) C++ Duration: 3 hours Total Marks: 70 Unit No. Unit Name Marks 1. OBJECT ORIENTED PROGRAMMING IN C++ 30 2. DATA STRUCTURE 14 3. DATABASE MANAGEMENT SYSTEM AND SQL 8 4. BOOLEAN ALGEBRA

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

14 Stacks, Queues, And Linked Lists

14 Stacks, Queues, And Linked Lists 14-1 Java Au Naturel by William C. Jones 14-1 14 Stacks, Queues, And Linked Lists Overview This chapter requires that you have a solid understanding of arrays (Chapter Seven) and have studied Exceptions

More information

Zoho CRM and Google Apps Synchronization

Zoho CRM and Google Apps Synchronization Zoho CRM and Google Apps Synchronization Table of Contents End User Integration Points 1. Contacts 2. Calendar 3. Email 4. Tasks 5. Docs 3 6 8 11 12 Domain-Wide Points of Integration 1. Authentication

More information

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along

More information

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER Course Outline (2015) Basic Programming With Procedural & Object Oriented Concepts (C, C++) Training Office# Road: 11, House: 1 A, Nikunja 2, Khilkhet,

More information

Chapter 6. Decoding. Statistical Machine Translation

Chapter 6. Decoding. Statistical Machine Translation Chapter 6 Decoding Statistical Machine Translation Decoding We have a mathematical model for translation p(e f) Task of decoding: find the translation e best with highest probability Two types of error

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Instructions for setting up Junk E mail filters

Instructions for setting up Junk E mail filters Instructions for setting up Junk E mail filters Junk E mail filters must be set up using Microsoft Outlook. Users cannot use My.NWACC.Connection or the Web option to successfully configure their Junk E

More information

CSC 2405: Computer Systems II

CSC 2405: Computer Systems II CSC 2405: Computer Systems II Spring 2013 (TR 8:30-9:45 in G86) Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Introductions Mirela Damian Room 167A in the Mendel Science Building mirela.damian@villanova.edu

More information

Unit Testing with Monkeys Karl-Mikael Björklid (bjorklid@jyu.) University of Jyväskylä Department of Mathematical Information Technology

Unit Testing with Monkeys Karl-Mikael Björklid (bjorklid@jyu.) University of Jyväskylä Department of Mathematical Information Technology Abstract Unit Testing with Monkeys Karl-Mikael Björklid (bjorklid@jyu.) University of Jyväskylä Department of Mathematical Information Technology Unit testing has become an incresingly popular way of assuring

More information

Chapter 2: Elements of Java

Chapter 2: Elements of Java Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction

More information

Stacks and queues. Algorithms and Data Structures, Fall 2011. Rasmus Pagh. Based on slides by Kevin Wayne, Princeton

Stacks and queues. Algorithms and Data Structures, Fall 2011. Rasmus Pagh. Based on slides by Kevin Wayne, Princeton Algorithms and Data Structures, Fall 2011 Stacks and queues Rasmus Pagh Based on slides by Kevin Wayne, Princeton Algorithms, 4 th Edition Robert Sedgewick and Kevin Wayne Copyright 2002 2011 Stacks and

More information

18-447 Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/18/2013

18-447 Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/18/2013 18-447 Computer Architecture Lecture 3: ISA Tradeoffs Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/18/2013 Reminder: Homeworks for Next Two Weeks Homework 0 Due next Wednesday (Jan 23), right

More information

İSTANBUL AYDIN UNIVERSITY

İSTANBUL AYDIN UNIVERSITY İSTANBUL AYDIN UNIVERSITY FACULTY OF ENGİNEERİNG SOFTWARE ENGINEERING THE PROJECT OF THE INSTRUCTION SET COMPUTER ORGANIZATION GÖZDE ARAS B1205.090015 Instructor: Prof. Dr. HASAN HÜSEYİN BALIK DECEMBER

More information

MPLS Environment. To allow more complex routing capabilities, MPLS permits attaching a

MPLS Environment. To allow more complex routing capabilities, MPLS permits attaching a MPLS Environment Introduction to MPLS Multi-Protocol Label Switching (MPLS) is a highly efficient and flexible routing approach for forwarding packets over packet-switched networks, irrespective of the

More information

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity. 7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,

More information

Virtual Leased Lines - Martini

Virtual Leased Lines - Martini Virtual Lease Lines - Martini Virtual Leased Lines - Martini Martini Drafts draft -martini-l2circuit-encap-mpls -04.txt defines the handling and encapsulation of layer two packets. draft -martini-l2circuit-trans-mpls

More information

First Bytes Programming Lab 2

First Bytes Programming Lab 2 First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed

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

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

64-Bit NASM Notes. Invoking 64-Bit NASM

64-Bit NASM Notes. Invoking 64-Bit NASM 64-Bit NASM Notes The transition from 32- to 64-bit architectures is no joke, as anyone who has wrestled with 32/64 bit incompatibilities will attest We note here some key differences between 32- and 64-bit

More information

Statistical Machine Translation

Statistical Machine Translation Statistical Machine Translation Some of the content of this lecture is taken from previous lectures and presentations given by Philipp Koehn and Andy Way. Dr. Jennifer Foster National Centre for Language

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Lecture 4 2016 Stacks and... 1/28 1 2 Circular Linked 3 Queue Syntax and Functions in C++ 4 Stacks and... 2/28 FIFO and LIFO Outline Data structures can be specialized versions

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