摘要: http://www.cnblogs.com/graphics/archive/2010/06/21/1752421.html 阅读全文
posted @ 2016-08-02 22:09 琴影 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2016-08-02 21:55 琴影 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple 阅读全文
posted @ 2016-08-02 18:38 琴影 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num = 16, return true. Given num = 5, return f 阅读全文
posted @ 2016-08-02 18:13 琴影 阅读(240) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文
posted @ 2016-08-02 16:52 琴影 阅读(315) 评论(0) 推荐(0) 编辑