CS 381 - Homework 7

Update

Now that the Homework 7 submission period is over, you can now see the code for the backend (and frontend!) that powers this page here: https://github.com/ericswpark/purdue_cs381-hw7


For this week’s homework, you can now see all the test cases and expected outputs under each homework! If you want to add test cases, please email park1246@purdue.edu with your test case.

Question 2

Question 2 test cases

Question 4

Note: the number of homework and maximum days supplied cannot exceed 100. This isn’t because the algorithm is inefficient (as noted in the question it must be polynomial) – the server is just very severely underpowered.

Question 4 test cases

Note (2024-10-15 21:48): The library that I’m using had a limitation that I overlooked when the number of homework assignments passed the highest day value. If you received a network error with certain inputs this is likely the cause. This has been patched.


If you are using Firefox on Android, form validation won’t work, so the form won’t submit if you enter invalid values and not tell you why. This is not my fault. There is a longstanding (6 years long) bug open on their Bugzilla.


Warning: while care has been taken to verify the algorithm, the answer this page gives may be incorrect. Do not use this as the sole verification for your answers. I am not responsible for any lost points on your homework.

comments