Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

S0cI0pAtH's blog

By S0cI0pAtH, history, 10 years ago, In English

How i can solve it if n = 5000 in the following problem ? http://postimg.org/image/4cfbw9vc5/ thanks in advance :)

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
10 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

The naive O(N3) approach can be optimized to O(N2).
Read about palindrome partitioning