add testcases for hackerrank
passed basic testcases from hackerrank(slow).\nFixed issue with computing e_j
add testcase files