1750. Check If Two Expression Trees are Equivalent

Medium
Hash Table
Tree
Depth-First Search
Binary Tree
Counting

Description

Hints

Hint 1
Count for each variable how many times it appeared in the first tree.
Hint 2
Do the same for the second tree and check if the count is the same for both tree.

Statistics

Acceptance
71.6%
Submissions
11,894
Accepted
8,517