The above code shows wrong answer in Testcase #2. What is the issue in it?
Sorted Array code error
if I include the equal operator in line 21 of the code , then testcase 1 and 3 fails and testcase 2 passes.
yaah…it’s solved…thanks…I want to know why is this happening when i am taking the input through bufferedreader?
@yashomar95,
The input test cases sometimes give error for bufferedreader. I would suggest practice using scanner class only.