Assignment 1.

All assignments are individual work. We use MOSS to detect software plagiarism.  Any evidence of copying will be considered a breach of academic honesty and will be dealt with accordingly (see www.cse.yorku.ca/admin/coscOnAcadHonesty.html for more information).

This assignment is due at 11:59pm Thursday Jan 25th. Late assignments will not be accepted.  There are no exceptions.

Each of the questions below defines a new package, i.e., source directory: A1Q1, A1Q2 or A1Q3. You should create these directories in your userspace and download the .java source files to the appropriate directories. However, note that you need only submit one .java source file (one class) per question (see detailed instructions below). You do not need to submit the files you do not change.

Do not change the package name at the top of each file: we depend on these when we compile and test your programs.

For each question, a test program is provided that will allow you to test your code. This test program does not exhaustively test all functionality: you should test your program on a wider range of conditions than specified in the test program. A different test program, typically testing a broader range of conditions, will be used to grade your assignment.

Your methods should be able to handle error conditions as specified, throwing the appropriate exceptions, which will be caught by our testing programs. This will be part of the evaluation.

Please note that to get full marks, your program must:

  1. Pass all test cases (produce the correct output and/or exceptions for each input)
  2. Have the correct asymptotic run time (if specified)

Question 1. Sparse Vectors (35 marks)

Question 2. Integral Images (35 marks)

Question 3. Maximum Value Stack (30 marks)

Submitting your Programming Assignments
All assignments will be submitted electronically using web submit.

Detailed Submission Instructions: