Hi,
I have been solving the following question.
http://www.codechef.com/problems/WALK
the question is an easy one.
My question is regarding this solution.
http://ideone.com/zbSaAy
if i keep br.close() in the code, codechef judge gives runtime error.
if i remove this, then my code is accepted.
I am facing the same problem in many codes.
Can anyone please help.
Thank you very much
Brother, remove .close(). When a file is “opened,” the OS marks the file as locked, generally so it can’t be deleted by other processes while it’s being used. x.close() undoes the lock, allowing the OS and other processes to do what it wishes with the file. I’ve answered it in recent post : http://discuss.codechef.com/questions/53366/java-closing-bufferedreader & your corrected code: http://ideone.com/GkbF9p