-
LeetCode—905. Sort Array By Parity
//url:https://leetcode.com/problems/sort-array-by-parit…
-
LeetCode—929. Unique Email Addresses
//url:https://leetcode.com/problems/unique-email-addres…
-
LeetCode—590. N-ary Tree Postorder Traversal
//url:https://leetcode.com/problems/n-ary-tree-postorde…
-
LeetCode—485. Max Consecutive Ones
//url:https://leetcode.com/problems/max-consecutive-one…
-
LeetCode—226. Invert Binary Tree
//url:https://leetcode.com/problems/invert-binary-tree/…
-
LeetCode—559. Maximum Depth of N-ary Tree
//url:https://leetcode.com/problems/maximum-depth-of-n-…
-
LeetCode—292. Nim Game
必胜策略:第一次拿 n%4个,然后不管对手拿多少个,自己拿 (n-对手拿的个数)就必赢了 //url:http…
-
LeetCode—762. Prime Number of Set Bits in Binary Representation
分两步,首先获取为1的bit位的数量,然后判断改数量是否是质数, 10^6的位数有限,可以先写出对应范围内的质…
-
LeetCode—104. Maximum Depth of Binary Tree
递归遍历即可 //url:https://leetcode.com/problems/maximum-dept…
-
LeetCode—693. Binary Number with Alternating Bits
solution 1: 低效,每次判断最后一位bit的值,然后和上一次最后一位的bit值对比 //url:ht…