standard template library
play

Standard Template Library Bryce Boe 2013/08/20 CS24, - PowerPoint PPT Presentation

Standard Template Library Bryce Boe 2013/08/20 CS24, Summer 2013 C Outline Lab 7 Solu@on Project 2 Solu@on Project 3 Overview Extra


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

  2. Outline ¡ • Lab ¡7 ¡Solu@on ¡ • Project ¡2 ¡Solu@on ¡ • 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 ¡solu@on> ¡

  4. Project ¡2 ¡Solu@on ¡ • <In ¡class ¡look ¡at ¡my ¡solu@on> ¡

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

  6. Input ¡File ¡ # ¡Priori@es ¡ 01 ¡Cough ¡ 10 ¡Bleeding ¡ # ¡Doctors ¡ Dr. ¡Doctor ¡ # ¡Pa@ent ¡Arrivals ¡ 08:00 ¡“Pa@ent ¡A” ¡“Head ¡ache” ¡25 ¡ 08:00 ¡“Pa@ent ¡B” ¡“Bleeding” ¡60 ¡

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

  8. Data ¡Structures ¡to ¡Use ¡ • Queue ¡ – Pa@ent ¡arrivals ¡ – Available ¡doctors ¡ • MaxHeap ¡ – Pa@ents ¡who ¡are ¡wai@ng ¡to ¡see ¡a ¡doctor ¡ – Pa@ents ¡who ¡are ¡currently ¡seeing ¡a ¡doctor ¡ • Hash ¡Table ¡ – Mapping ¡of ¡symptom ¡to ¡priority ¡

  9. Extra ¡Credit ¡Assignment ¡ • 1024+ ¡word ¡reflec@on ¡essay ¡ • How ¡has ¡this ¡course ¡made ¡an ¡impact ¡(can ¡be ¡ both ¡posi@ve ¡and ¡nega@ve) ¡on ¡you? ¡ • Wri@ng ¡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) ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend