1 / 11

CSE111: Great Ideas in Computer Science

CSE111: Great Ideas in Computer Science. Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu. cell phones off (please). Announcements. Exam 1 & 2 handback HW4 due April 2 Third is exam is April 21 (last full week of classes)

hugh
Download Presentation

CSE111: Great Ideas in Computer Science

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. CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu

  2. cell phones off (please)

  3. Announcements • Exam 1 & 2 handback • HW4 due April 2 • Third is exam is April 21 (last full week of classes) • We will be taking attendance • Does not count directly for grade • Just curious who is and is not attending

  4. Today’s Agenda • Algorithm wrap-up • Computer graphics introduction

  5. Describing algorithms • Flow-of-control structures • Sequencing • Selection • Repetition • Primitive operations • E.g. pairwisecomparision

  6. Developing algorithms • Top-down • Start with abstract/general case • Iteratively make more specific • Bottom-up • Start with concrete case • Iteratively make more general

  7. Sorting • Put items in order • “smallest” to “largest” • “largest” to “smallest” • Ordering can be done in many ways • Name • SSN • GPA, then age, then telephone number

  8. Selection sort • Choose smallest • Place at front • Repeat with rest until done • To sort n numbers, needs O(n2) time

  9. Merge sort • Split into (roughly) equal halves • Recursively sort the halves • Merge results to produce answer • To sort n numbers, needs O(n log2n) time

  10. Computer Graphics • Tron (1982) • Shrek (2001, 2004, 2007) • LOTR (2001,2002,2003) • Harry Potter (2001-2009, current) • Pirates of the Carribean (2003, 2006, 2007) • Avatar (2009)

More Related