摘要: Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.Example 1:Input: 5 Output: True Explanation: The binary representation o... 阅读全文
posted @ 2017-10-08 22:08 xiejunzhao 阅读(195) 评论(0) 推荐(0)
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrou... 阅读全文
posted @ 2017-10-08 21:58 xiejunzhao 阅读(1576) 评论(0) 推荐(0)