i am not sure what has went wrong here. Both algorithms are meant to produce the same output. The first one is working fine but the second one is producing 0 and i am not su