Pinterest | Phone screen | full stack

Anonymous User
1604
Mar 13, 2024

Given two set, determine if they're exactly the same without using a built in function. The keys can either be strings or sets.

Example:

Input:
set1 = {a, {b, {c}}}  set2 = {{{c}, b}, a}

Output: true

Input:
set1 = {a, {b, c}} set2 = {a, {b, {c}}}

Output: false
Comments (9)