Name: ____________________________________________________ Alpha: _____________ Section:________

Describe help received: _________________________________________________________________

See the bottom for how to submit your work.

Due: Before 0800 on next class day

  1. (10 pts) Read today's lecture notes. Honestly declare how you read the notes.
    1. (10 pts) I read the notes carefully. I have a good understanding of the topics therein.
    2. (10 pts) I read the notes carefully, but I don't really understand the following points well:
      
      
      
    3. (0 pts) I didn't read the notes carefully.
  2. [10pts] Suppose you are writing a program that reads strings from the user and prints them in order. Assume that the usual selection_sort function has already been defined for strings.

    Define a before() function so that the strings may be ordered as follows:
    • In increasing order of the last character.
    • Any two strings with the same last charater should be ordered alphabetically in increasing order (i.e., according to the ASCII code).
    See an example on the right.
    original strings
    suppose 
    you 
    are 
    writing 
    a 
    program 
    that 
    reads 
    strings 
    
    sorted strings
    a
    are 
    suppose
    writing
    program
    reads
    strings
    that
    you
    

Bring to class