Codercell's blog

By Codercell, history, 10 years ago, In English

I was recently solving dp on tree type problems and i came across this.

Problem

do you think the solution given in editorial is correct.I feel it doesnt include all the cases.He says for every vertex as root , consider all subtrees...This doesnt include all the possible Sets S. Please someone explain this to me

Thanks in advance

Full text and comments »

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

By Codercell, history, 10 years ago, In English

Guys , in the below TRIE tutorial in problem 2 , he explains a way to find maximum XOR subarray in a given array.But i find that the method illustrated requires O(n^2) operations as N times he queries the Trie each of which takes linear time.How does the solution pass the time limit. Trie Tutorial

Trie Question

Full text and comments »

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