HackerEarth Problem solutions