摘要: 题目: 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 @ 2017-01-25 14:38 tmx 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter 阅读全文
posted @ 2017-01-25 14:04 tmx 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 farthe 阅读全文
posted @ 2017-01-25 13:03 tmx 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 要求计算两个整数a 阅读全文
posted @ 2017-01-25 12:47 tmx 阅读(148) 评论(0) 推荐(0) 编辑