Written Homework Guidelines

For our written homework assignments, typed assignments are preferred. Handwritten will be accepted, but note that if the TA has a hard time reading your work, the TA will also have a hard time giving you a good grade. Writeups for programming projects must be turned in electronically, which means those must be typed anyway.

Some problems on the written assignments ask you to give an algorithm to solve a problem. Unless the assignment specifically tells you to implement the code and run it, pseudocode is acceptable. Pseudocode means that you don't have to write every line in Java with correct syntax; English explanations of operations are acceptable. Note that the general rule you should follow is that you can substitute English for any O(1) operation, but not for more complex steps. Thus, the following would not be acceptable:

  scan the list and count all elements greater than x

while the following would be OK

  int counter  // keeps track of total num > 0
  for each element in the list:
     if current element is greater than x
        increment counter

The idea is that you don't have to give all the nitty-gritty coding details (that's what the programming assignments are for), but you should demonstrate a clear understanding of what your algorithm does and where those nitty-gritty details would have to go.

For the purposes of our homework, when in doubt, MORE detail is probably better than less detail. Another way of thinking of this is to say you should write your answer in code, but we won't be taking off any points for syntax. A common mistake for students to make is to use a phrase in a pseudocode answer that is too vague without realizing it. In the example above, actually defining a pseudo-variable is one way of being sure the reader (grader) can tell what you are incrementing - AND that your algorithm will compute the correct result!