摘要: 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 a... 阅读全文
posted @ 2015-03-27 10:27 hongchun_z 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.每次对比最高位和最低位bool isPalindrome(int x) { if(x = 10) base = ... 阅读全文
posted @ 2015-03-27 09:38 hongchun_z 阅读(101) 评论(0) 推荐(0) 编辑
摘要: C++中map容器提供一个键值对容器,map与multimap差别仅仅在于multiple允许一个键对应多个值。map是一类关联式容器。它的特点是增加和删除节点对迭代器的影响很小,除了那个操作节点,对其他的节点都没有什么影响。对于迭代器来说,可以修改实值,而不能修改key。map的功能自动建立Key... 阅读全文
posted @ 2015-03-27 09:21 hongchun_z 阅读(222) 评论(0) 推荐(0) 编辑