摘要:
LeetCode——Fizz Buzz Question Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should outpu 阅读全文
摘要:
LeetCode——Keyboard Row Question Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyb 阅读全文
摘要:
LeetCode——Number Complement Question Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary 阅读全文
摘要:
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 阅读全文