Блог пользователя Codercell

Автор Codercell, история, 10 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

Автор Codercell, история, 10 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится