Extract helpers for isDownhill and isUphill
Extract helpers for isDownhill and isUphill

rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank