摘要: 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-04-25 21:59 TonyLuis 阅读(241) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321解题思路:将数字翻转并不难,可以转成String类型翻转,也可以逐位翻转,本题涉及到的主要是边界和溢出问题,使用Long... 阅读全文
posted @ 2015-04-25 21:09 TonyLuis 阅读(183) 评论(0) 推荐(0) 编辑
摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font ... 阅读全文
posted @ 2015-04-25 17:26 TonyLuis 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes... 阅读全文
posted @ 2015-04-25 11:30 TonyLuis 阅读(274) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh... 阅读全文
posted @ 2015-04-23 21:40 TonyLuis 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-04-23 21:36 TonyLuis 阅读(208) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-04-23 21:09 TonyLuis 阅读(153) 评论(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 two nu... 阅读全文
posted @ 2015-04-23 20:55 TonyLuis 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 绝对路径和相对路径:绝对路径: /home/tony/Desktop相对路径:Desktop 或者./Desktop不可写成/Desktop(这是绝对路径的写法)其中.代表本层目录,..代表上层目录,~代表当前用户的主文件夹。cd (change directory)命令cd 返回当前用户的主文件夹... 阅读全文
posted @ 2015-04-14 11:45 TonyLuis 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 不少人曾在Windows下及Ubuntu下都遇到过Android设备无法识别的情况,就是run as Android Application的时候,target显示"??????",使用adb devices 查看设备状况,显示List of devices attached????????????... 阅读全文
posted @ 2015-04-10 20:34 TonyLuis 阅读(293) 评论(0) 推荐(0) 编辑