0089-gray-code 0090-subsets-ii 0094-binary-tree-inorder-traversal 0096-unique-binary-search-trees 0098-validate-binary-search-tree 0100-same-tree 0101-symmetric-tree 0102-binary-tree-level-order-traversal 0104-maximum-depth-of-binary-tree 0105-construct-binary-tree-from-preorder-and...
1021-distribute-coins-in-binary-tree 1034-subarrays-with-k-different-integers 1039-find-the-town-judge 1044-find-common-characters 1087-longest-arithmetic-subsequence 1092-maximum-difference-between-node-and-ancestor 1114-binary-search-tree-to-greater-sum-tree 1116-maximum-level-sum-of-a-binary-tree...
804-unique-morse-code-words Time: 10 ms (20.67%), Space: 8.6 MB (30.73%) - LeetHub Aug 18, 2022 814-binary-tree-pruning Time: 7 ms (25.91%), Space: 8.9 MB (21.13%) - LeetHub Sep 7, 2022 820-short-encoding-of-words Time: 147 ms (38.23%), Space: 18.4 MB (68.14%) - Lee...
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} ...