2 questions :
Range sum of BST
Given a list of Contacts, where each contact consists of a contact ID and a list of email IDs. Output a unique list of contacts by removing duplicates. Two contacts are considered to be the same, if they share at least one email ID.
eg :- U1 - abc@gmail.com, def@gmail.com
U2 - def@gmail.com, xyz@hotmail.com
U3 - xyz@hotmail.com, tuv@gmail.com
U4 - ab@gmail.com, bc@gmail.com
ans - ((U1, U2, U3), (U4))