code is not passing all the test cases.
please check…
Getting wrong answer
@rabhi1611 what if no not present like this case
5
1 5 7 10 12
3
2
3
4
your code gives 1 0 for all but it should be -1 -1 for all
code is not passing all the test cases.
please check…
@rabhi1611 what if no not present like this case
5
1 5 7 10 12
3
2
3
4
your code gives 1 0 for all but it should be -1 -1 for all