2 ms·
I'm perfectly aware, but can you take that approach and execute it in 6 "steps" for all data sizes? Since the whole point of the exercise is "optimizing" maxPa
by bp_ 15y ago
I'm perfectly aware, but can you take that approach and execute it in 6 "steps" for all data sizes?
Since the whole point of the exercise is "optimizing" maxPairSum so that it runs in 20 "steps" or less, I guess this slower solution is still more "optimized" - which was my whole point, after all. :)
(Please note 6 steps is the bare minimum - one for the function definition, one for preparing input, one for calling the function, one for calling the function, one for assigning function arguments, one for the actual function and one for returning from the function. You can't go shorter than this.)