Soln:https://ide.codingblocks.com/s/57753
Question:https://leetcode.com/problems/unique-email-addresses/
Unique email address
Hi Shraddha, I am assuming that your facing problem in counting distinct email addresses after processing all the the email address strings, as that is the only part missing in the code whose link you have shared above.
You can do this by creating a hash map using unordered map where as soon as you obtain the processes string you increment it’s frequency in that hash map.
After you have processed all the strings print the size of hash map by using
cout << < unordered_map’s name >.size() ;
This will be your final answer.
If there is any other doubt then please reply to this thread.
Hi Shraddha, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.