« first day (1 day earlier)    last day (15 days later) » 

12:45 PM
That is not correct cris. Let me tell you why, remapping is ubiquotously used every place. Imagine you have 100 projects where you use remapping one way or another. In one place you might as well want to remap rand5 to 0-7, at some other place 2-3.
In cases like 0-7, yes it is like doing rand5/5*7, but in other places it is min + (max-min)*rand5/5. And sometimes (in my profession not sometimes, mostly) you have a number,let's say 3, that is between 0-5, you want to remap 3**2 which 9 (and between 0 -25) to 0-10 for instance. Imagine all these are scattered in 100 projects.. Which one is efficient? Calculating efficiently and dollars/hour is not a linear function, and changes with respect to time, short term vs long term.
This is the sole reason why for instance in d3, a scaling function d3.scale exists and in many many other libraries. If the exam corrector gave me 2/3 just because he doesn't like the way I approached this, I'd say fair enough, but giving 0/3 to a working and scalable solution is being a blatant asshole, and I'm senior enough to distinguish the difference.
 

« first day (1 day earlier)    last day (15 days later) »