摘要: 基本思路:把 int 转换成string 借用stringstream 时间复杂度O(n) 1 class Solution { 2 public: 3 public: 4 bool isPalindrome(int x) { 5 6 stringstream ss; ... 阅读全文
posted @ 2015-06-03 21:46 尾巴草 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 问题描述:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the t... 阅读全文
posted @ 2015-06-03 20:29 尾巴草 阅读(132) 评论(0) 推荐(0) 编辑