Nimazare's blog

By Nimazare, history, 5 years 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

»
5 years 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.

  • »
    »
    5 years 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 .