md1844's blog

By md1844, history, 5 years ago, In English

SHARECHAT 3RD QUESTION: A-Z COUNT

Need help on this question. I used map and binary search still all test cases not passed. Test is over now.

So if anybody can share the working code it would be helpful for me.\

Image:

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

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Just make vector for every character and find lower bound of k for S type queries and (lower bound of (k+1)) — 1 for L type queries. Also, Handle Not found condition. If you did the same and still getting WA to check your implementation.