[Home]

CS 223 - Fall 2016. 10/17

Welcome to CS 223!

Logical problem of the day

  In the old days, there was a computer program that would fail every
  day at roughly 6:12 pm.  Why?
Answer on piazza:
In the program, the time from midnight is represented by an unsigned short, which goes up to 2^16 - 1 = 65535. At 6:12:15, the seconds from midnight will have been 18 * 3600 + 12 * 60 + 15 = 65535. So then the variable overflows.
New problem: what's wrong with the following code?
/*
 * default
 */
default:
  break;

Lecture 13: Stacks and Queues.

Administrivia

Office hours posted to piazza and here.

Assignment 4

  • Homework #4
  • Lecture 13

  • There was a question last Monday about bucket sort
  • Aspnes' Very Fine CS 223 notes from Spring 2015

  • [Home]