Please help!

problem link :

link to my solution :


my approach :
I created two boolean arrays for size 54 for storing each character as true or false
1 to 26 stores ‘a’ to ‘z’ and 27 to 52 stores ‘A’ to ‘Z’ as true or false.
Then both the array’s are compared and the number of common character’s is found.

I guess that multiple instances of a stone occurring has to be counted.

Your output : 1
Correct output : 2
1 Like