Editorial Solution Giving TLE for Java Conversion :(

Revision en3, by formidablechief27, 2023-12-14 10:06:59

I was solving this question 1731C - Even Subarrays

I was getting TLE on test 2 until i decided to have a look a at the editorial Editorial suggested an n root n complexity answer => 186975655

which then i implemented the same in java and 237133047

i felt maybe hash map collisions could lead to this, so i tried with trie data structure as well that didnt even cross test 3

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English formidablechief27 2023-12-14 10:06:59 75
en2 English formidablechief27 2023-12-14 10:06:22 75
en1 English formidablechief27 2023-12-14 10:04:54 460 Initial revision (published)