HW 1 Oracle Queues Due: Wednesday, April 6th

Slides:



Advertisements
Similar presentations
STACKS & QUEUES. Stacks Abstract data types An abstract data type (ADT) is an abstraction of a data structure An ADT specifies : –Data stored –Operations.
Advertisements

Queues1 Part-B2 Queues. Queues2 The Queue ADT (§4.3) The Queue ADT stores arbitrary objects Insertions and deletions follow the first-in first-out scheme.
Data Structures and Algorithms Lecture (Queues) Instructor: Quratulain.
Circular List Next field in the last node contains a pointer back to the first node rather than null pointer From any point in such a list it is possible.
Data Structures - Queues
Queue 09/10/081. Queue (Linear Queue) It is a linear data structure consisting of list of items. In queue, data elements are added at one end, called.
CSE373: Data Structures & Algorithms Lecture 8: AVL Trees and Priority Queues Catie Baker Spring 2015.
CSE 373 Spring 2016 HW 3 BST: Keyword Search due Friday April 22.
CSE373: Data Structures & Algorithms Lecture 8: AVL Trees and Priority Queues Linda Shapiro Spring 2016.
Queues and Priority Queue Implementations Chapter 14 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
Chapter 3 Lists, Stacks, Queues. Abstract Data Types A set of items – Just items, not data types, nothing related to programming code A set of operations.
Virtual Environments and Computer Graphics
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
Nasal Cannula X particulate mask
L-Systems and Affine Transformations
Face Recognition Monday, February 1, 2016.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Y V =0 a V =V0 x b b V =0 z
Climate-Energy-Policy Interaction
FW 3.4: More Circle Practice
Online Social Networks and Media
פרויקט מסכם לתואר בוגר במדעים (B.Sc.) במתמטיקה שימושית
doc.: IEEE <doc#>
Progress on Beam Loading Studies
Liang Shang, Henan Normal University IHEP
C++ Programming: Presentation 1
Queues 5/11/2018 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H.
Explanation Answer Code Question A J M X D H P S K L B C X 4
COSC160: Data Structures: Lists and Queues
September 29 – Stacks and queues
Chapter 15 Lists Objectives
March 29 – Testing and Priority QUeues
CSE 373: Data Structures and Algorithms
Stacks and Queues.
Stack and Queue APURBO DATTA.
Queues Chapter 8 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved
Queues 11/9/2018 6:32 PM Queues.
Queue, Deque, and Priority Queue Implementations
Chapter 15 Lists Objectives
Queues.
Data Structures – Stacks and Queus
Queue and Priority Queue Implementations
Chapter 14: Queue and Priority Queue Implementations
Revised based on textbook author’s notes.
CSC 143 Queues [Chapter 7].
Handles disk file 0000: array of file-offsets 0001: 0002: 0003: 0: …
Queues 12/3/2018 Queues © 2014 Goodrich, Tamassia, Goldwasser Queues.
Queues 3/9/15 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser,
Stacks and Queues CSE 373 Data Structures.
Lecture 19 CSE 331 Oct 12, 2016.
Queues A first-in, first-out or FIFO data structure.
Stack A data structure in which elements are inserted and removed only at one end (called the top). Enforces Last-In-First-Out (LIFO) Uses of Stacks Evaluating.
Data Structures and Algorithms for Information Processing
Lecture 20 CSE 331 Oct 17, 2011.
Stacks and Queues CSE 373 Data Structures.
CSE 373 Data Structures Lecture 6
Lecture 18 CSE 331 Oct 9, 2017.
ADT Queue (Array Implementation)
Lecture 16 Stacks and Queues CSE /26/2018.
Lecture 21 CSE 331 Oct 22, 2012.
CE 221 Data Structures and Algorithms
Circular Queues: Implemented using Arrays
Stacks and Queues CSE 373 Data Structures.
CSE 373 Data Structures Lecture 6
Lecture 16 Stacks and Queues CSE /26/2018.
Queues and Priority Queue Implementations
Instructor: Dr. Michael Geiger Spring 2019 Lecture 34: Exam 3 Preview
Data Structures and Algorithms
Lecture 9: Stack and Queue
Data Structures & Programming
Presentation transcript:

HW 1 Oracle Queues Due: Wednesday, April 6th CSE 373 Spring 2016 HW 1 Oracle Queues Due: Wednesday, April 6th

The Concept 0 1 2 3

The Details Each oracle has a queue, initially empty. Questions come in from a file into questions array and answers from a file into answers array. There is a random number generator that generators a number between 0 and numOracles -1, so it “picks” an oracle. Each question is enqueued into the queue of one of the oracles based on the random number generated for it.

Round-Robin Answering Round-Robin means we go through the oracles one at a time and then start over again till all questions are answered. Each oracle removes one question from its queue (unless the queue is empty; then it does nothing). It prints the question, a colon (:), and its answer. Each oracle has only one answer. They aren’t too bright.

What We Give You Utility.java Executor.java ArrayQueue.java includes initialization, functions for reading files, and the random function. Nothing for you to do. Executor.java main program that initializes Utility, reads the files, and contains comments where you will insert your code. ArrayQueue.java class ArrayQueue: you will write the methods ArrayQueueTest.java tests the circularity functions of your ArrayQueue

What To Submit Executor.java ArrayQueue.java Insert your code where the comments say so. ArrayQueue.java Write the methods with TODO. Some functions have temporary return values you can remove when you write your code.

Questions?