πDay 13. Account Merge π§
π‘ Problem Description:
π Example Walkthrough:
Example 1:
Input:
accounts = [
["John", "johnsmith@mail.com", "john_newyork@mail.com"],
["John", "johnsmith@mail.com", "john00@mail.com"],
["Mary", "mary@mail.com"],
["John", "johnnybravo@mail.com"]
]Output:
Explanation:
Example 2:
Input:
Output:
Explanation:
π― My Approach
Disjoint Set Union (Union-Find)
Algorithm Steps:
π Time and Auxiliary Space Complexity
π Solution Code
Code (C++)
Code (Java)
Code (Python)
π― Contribution and Support:
πVisitor Count
Last updated