1 / 10

Standard Template Library

Standard Template Library. Bryce Boe 2013/08/20 CS24, Summer 2013 C. Outline. Lab 7 Solution Project 2 Solution Project 3 Overview Extra Credit Assignment C++ Standard Template Library (STL ). Lab 7. Verify whether or not an array is in heap-order

hashim
Télécharger la présentation

Standard Template Library

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Standard Template Library Bryce Boe 2013/08/20 CS24, Summer 2013 C

  2. Outline • Lab 7 Solution • Project 2 Solution • Project 3 Overview • Extra Credit Assignment • C++ Standard Template Library (STL)

  3. Lab 7 • Verify whether or not an array is in heap-order • Idea 1: For each node verify its children (if present) are not larger • Idea 2: For each node verify its parent is not smaller • <In class look at my solution>

  4. Project 2 Solution • <In class look at my solution>

  5. Project 3 Overview • Concept: Hospital emergency room log • Logs when (1) patients arrive, (2) patients are visited by a doctor, and (3) when patients leave

  6. Input File # Priorities 01 Cough 10 Bleeding # Doctors Dr. Doctor # Patient Arrivals 08:00 “Patient A” “Head ache” 25 08:00 “Patient B” “Bleeding” 60

  7. Output File 08:00 Patient A arrives 08:00 Patient B arrives 08:00 Dr. Doctor visits Patient B about Bleeding 09:00 Patient B departs 09:00 Dr. Doctor visits Patient A about Head ache 09:25 Patient A departs

  8. Data Structures to Use • Queue • Patient arrivals • Available doctors • MaxHeap • Patients who are waiting to see a doctor • Patients who are currently seeing a doctor • Hash Table • Mapping of symptom to priority

  9. Extra Credit Assignment • 1024+ word reflection essay • How has this course made an impact (can be both positive and negative) on you? • Writing about what you directly learned will not be sufficient • Due by class next Tuesday

  10. C++ Standard Template Library • algorithm • vector • queue • unordered_map (tomorrow’s lab)

More Related