CSES Apartments- Timeout in java

Revision en1, by 69_LoVeRGuY, 2021-05-04 18:43:36

I was attempting the CSES Apartments problem and here is my solution in java. I've used the two pointer approach but still I have a timeout in one of the testcases. Someone please help me understand the shortcoming in my code.

Thanks in advance.

Tags #cses, #java, #help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 69_LoVeRGuY 2021-05-04 18:43:36 367 Initial revision (published)