Nimazare's blog

By Nimazare, history, 7 months ago, In English,

Memory limit and detect that ?

i get memory from this problem and i don't understand why .

help me to understand how detect memory of any problem and this problem

problem : my submission

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
7 months ago, # |
Rev. 3   Vote: I like it +4 Vote: I do not like it

The most likely culprit is your find_par method. Are you sure it always terminates?

If my hunch is correct, you will get AC if you check whether two nodes are already in same set before union.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thank you . your hunch is correct , my nodes are go out of the range of my array so for that i get MEMORY LIMIT .