Revision en1, by sandeep_iitpkd, 2023-06-08 06:25:37

Hi, there. I have made this submission while I was practicing: Submission link. The time complexity of this code is O(n). But I run the code I am TLE. I have also checked the editorial but I found no use. Beside the question there was an attention that time will be doubled. As I see in the test results the time consumed is 500ms, after getting doubled it becomes 1000ms which is TLE. Can someone help me to figure this out!!

Thank you in advance.

Tags greddy, iterative


  Rev. Lang. By When Δ Comment
en1 English sandeep_iitpkd 2023-06-08 06:25:37 517 Initial revision (published)