Please read the new rule regarding the restriction on the use of AI tools. ×

Adityaxv's blog

By Adityaxv, 2 hours ago, In English

Problem

My Solution

1964/2028 test cases have been accepted. Below is one of the test cases in which my code gives a wrong output:

Testcase
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

I think it's easier to solve using a Trie

»
90 minutes ago, # |
  Vote: I like it +1 Vote: I do not like it

You missed the non-overlapping constraint.