I am trying to implement the hacker3 sorting algorithm. The one that requires a O(n). I think I have figured out the algorithm but I won't spoil it by posting any code here.
My question is regarding to the inputs. It says that we are not allowed to change the definition of the functions and that the maximum available value constant can be used. I should mention here that the number is given as a
const int and is not defined as an alias.
The problem arises at the point where we need to access that number from a library declared before the number. The only solution I figured out was to re-declare it in the library, this implies that a change of that number per-compilation would be impossible to detect. Is there any way to actually access it? Or should we just live with the re-declaration?