摘要:
LeetCode——Hamming Distance Question The Hamming distance between two integers is the number of positions at which the corresponding bits are different 阅读全文
摘要:
LeetCode——Add Strings Question Given two non negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length 阅读全文
摘要:
```C++ // 计算树的高度 int depth(TreeNode* root) { if (!root) { return 0; } else { int i = depth(root->left); int j = depth(root->right); ... 阅读全文
摘要:
LeetCode——Diameter of Binary Tree Question Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary t 阅读全文
摘要:
LeetCode——Number of Boomerangs Question Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such 阅读全文