Can anyone tell me what’s wrong in my code?? All test cases in this post had pass…
Really cannot figure out what I am missing
Ok…so, once we have the x = the leftmost point not covered, then we see all those points coveering x and having k maximum,…and then update x=k+1
but then again we will have to see traverse all the points again…this will take O(N^2).Am i right…correct me plz, if i am!