https://leetcode.com/problems/maximum-depth-of-binary-tree/
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
求给定二叉树的最大的深度ÿ…
https://leetcode.com/problems/contains-duplicate-ii/
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] nums[j] and the difference between i and j is at most k.
这道题目源自…
https://leetcode.com/problems/power-of-two/
Given an integer, write a function to determine if it is a power of two.
数字 2^n 是大于0的,而且等于1左移n位得到的数字,所以2^n与2^n-1 相与运算得到0.
bool isPowerOfTwo(int n) {if(n < 0)…