.. (לתיקייה המכילה) | ||
Is the number of months bounded? In other words, can I assume that the number of months is O(1)? | |
No. |
Is it possible to fire a worker more than once? | |
No. Function Fire should fail and return -1 if the worker was already fired once. |
After a Fire command, can a subsequent ChangeSalary for the same worker be successful? | |
Yes, if the month of change is within the (new) working period. |
Can any of the arguments Month, Salary, and Compensation be (legally) zero? | |
Zero is a legal value for Month and Compensation, but not for Salary. |
If the maximum payment is zero, what should HighestPay return for the longest interval? | |
If the highest pay is zero, then no successful Hire was ever executed and your data structures should be empty. It does not matter what your function return in the interval variable, since no interval exists. |