@sergeyenin, I think you can't distinguish two cases here:
1. IterativeResult returns `-1` and it's correct answer.
2. IterativeResult and recursiveResult differs, hence something is wrong but you still returns `-1`.