minimize the absolute difference interviewbit solution python