Hackerrank practice c