I typed the same code as the sir typed in the video after watching the video.I was able to clear the sample test case but on submitting the solution in hackerblocks all the three test cases failed.I am not able to understand where I went wrong.Here is the code: