I’ve my solutions don’t seem correct… and I’m not sure of the language the code is written in.
Some assumptions that may effect the result:
- the number precession and overflow behaviour
- the empty array set indexing behaviour
- how non-consecutive array elements are printed
That is if how I’ve simplified the code down is correct.
Interesting C# aside: the C# compiler does not parse octal formatted numbers, so 12345 and 0x3039 do not equal 030071, quite a strange diversion from C and C++.