Update insertion_problem.py

added i=-1 case condition