I tried a lot of test cases but i don’t know why my answer is not accepted !!! can anyone let me know the edge cases where my code fails?
Question
My Answer
1
5
0 2 3 4 10
Try for this testcase U are getting wrong answer for this case.Figure out where u are going wrong.
Hope this helps.
1 Like
thanks
will you correct my code please?
I have used O(n^2) Approach and considered each element as infected one by one and checked which can be infected by this current infected person.
I saw your code you are making it a bit complex due to which finding mistake is a task ,
You can have a look My Simple solution-Click Here