Fetching data...
This may take a moment
Back
1750. Check If Two Expression Trees are Equivalent
Medium
Hash Table
Tree
Depth-First Search
Binary Tree
Counting
Solve on LeetCode
View Solutions
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.
Similar Questions
Build Binary Expression Tree From Infix Expression
Hard
Minimum Flips in Binary Tree to Get Result
Hard
Evaluate Boolean Binary Tree
Easy
Statistics
Acceptance
71.6%
Submissions
11,894
Accepted
8,517