Problem-MARBLE ....Need Help

For positions where char=’?’ I tried to count the maximum occuring vowel and consonant
Then printed the value of
(total_no_vowel-max_vowel)*2 +total_no_consonants ,
(total_no_consonant-max_consonant)*2 +total_no_vowel
+ no_of_operations where char!=’?’
Can anyone please explain why it’s not working?

1 Like

I did the exact same thing.
Did you skip the cases where both s[i]==’?’ and p[i]==’?’ in calculating total_no_vowel, max_vowel, total_no_of_consonants etc… ?
Also instead of simple calculating the answer try replacing ‘?’ in both S and P with the character that would give the minimum number of operations and calculate the total operations once again i.e if both are vowel/consonant ans+=2 else ans+=1(if s[i]!=p[i]).

I did it almost same.I skipped when s[i]==p[i] while counting vowels and consonants but instead of calculating the operations for where the char was ‘?’ after replacing it with the new vowel/consonant I did it in the beginning …I don’t think it makes any difference than the way you did but it still didn’t work for me.

check this solution i just kept count of total no of consonant and vowels and max occurrences to get the minimum possible value

Here’s my approach. It works on other platforms but gives NZEC runtime error here. IDK why
PS: far from optimized

Like a earlier faculty university student, I understand how difficult dealing with admission documents could possibly be. Regardless of the essay form you happen to be needed to submit, it could actually consider loads of your time when you are trying to do it all by yourself. To reduce tension and help you save some time, I counsel you to apply for some help with writing personal statement and have a top-notch paper in no time, you will not regret it as soon as you try it!