Assignment 1, due Jan 24
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (usually Friday). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!
function f( i ) -- i is positive integer parameter -- the return value is a character string r = i mod 10 q = i / 10 -- r and q are the integer remainder and quotient if q > 0 return f(q) concatenated with the character '0'+r else return '0'+r -- a single character
Problem: What is the falue of f(1024). (1 point)
a = head while a.value < b.value do a = a.next b.next = a.next a.next = b
A Question: The above code inserts items into a data structure. In English, this description has a very simple description. (as in "a lexicographic binary tree" or "an unsorted doubly-linked list", neither of which applies in this case.) What is the simple description? (1 point)