I AM not able to understand the question or description of the problem due to which I am not able to think for the optimal solution pls guys help me out !!!
Here’s my Solution. Hope it solves your issue.
Yeah the question is badly written. Where the cars want to move is not described properly.
The cars want to move from Right to Left. (This direction <------).
The algo is for each index find the
maximum allowed speed and if this speed is
<= to the speed of the
ith person, then we get a
+1 otherwise we get nothing.
Solution : CodeChef: Practical coding for everyone
thanks after seeing ur code I understood the problem actually!!!
Is this DSA Learners contest a rated contest?
No, it’s just for practice.