摘要:
问题: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin t 阅读全文
posted @ 2016-07-01 22:59
绵绵思远道
阅读(148)
评论(0)
推荐(0)
摘要:
问题: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is l 阅读全文
posted @ 2016-07-01 22:40
绵绵思远道
阅读(113)
评论(0)
推荐(0)
摘要:
题目: Given an integer, write a function to determine if it is a power of two. 答案: 2的幂有两个特点: 1)大于0 2)二进制形式都是首位为1,其余位为0,因此n&(n-1)等于0 阅读全文
posted @ 2016-07-01 21:52
绵绵思远道
阅读(148)
评论(0)
推荐(0)
浙公网安备 33010602011771号