Please tell me the error in my code. I cant understand java solutin which is available on hackerblocks

which one of these is your code and which one is editorial?