摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2017-10-13 22:17 immjc 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 比较两个字符串A和B,确定A中是否包含B中所有的字符。字符串A和B中的字符都是 大写字母 注意事项 在 A 中出现的 B 字符串里的字符不需要连续或者有序。 样例 给出 A = "ABCD" B = "ACD",返回 true 给出 A = "ABCD" B = "AABC", 返回 false 思 阅读全文
posted @ 2017-10-13 20:08 immjc 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2017-10-13 11:25 immjc 阅读(104) 评论(0) 推荐(0) 编辑
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2017-10-13 10:44 immjc 阅读(108) 评论(0) 推荐(0) 编辑