KharYusuf's blog

By KharYusuf, 4 days ago, In English,

Can anyone please resolve this bug for the solution for this problem. I had submitted a similar code where i used HashMaps for implementation and it got AC, but my other implementation won't.

So my implementation is as follows: make 5 lists of each vowel, sort the lists, and put words having same number of vowels in list named 'have'. The other words which don't match go into 'other'. Now, sort the list other, and repeat the same procedure, we will have the pairs of words in list named 'fr', which have the same number of vowels, but their last vowels differ. The answer is: sizeof(have) if sizeof(fr)>=sizeof(have), or size(fr)+(size(have)-size(fr))/2 otherwise.

It would be really helpful if someone pointed out where i am going wrong. Thanks in advance!

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

4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by KharYusuf (previous revision, new revision, compare).