2016年1月3日

3Sum

摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文

posted @ 2016-01-03 23:16 walkwalkwalk 阅读(214) 评论(0) 推荐(0) 编辑

Reverse Integer

摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Subscribeto see which companies asked th... 阅读全文

posted @ 2016-01-03 22:07 walkwalkwalk 阅读(238) 评论(0) 推荐(0) 编辑

Longest Common Prefix

摘要: Write a function to find the longest common prefix string amongst an array of strings.Subscribeto see which companies asked this question比较每个字符串的每个字符,... 阅读全文

posted @ 2016-01-03 21:04 walkwalkwalk 阅读(175) 评论(0) 推荐(0) 编辑

Roman to Integer

摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Subscribeto see which companies asked this q... 阅读全文

posted @ 2016-01-03 21:00 walkwalkwalk 阅读(239) 评论(0) 推荐(0) 编辑

Integer to Roman

摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Subscribeto see which companies asked this q... 阅读全文

posted @ 2016-01-03 20:56 walkwalkwalk 阅读(226) 评论(0) 推荐(0) 编辑

Container With Most Water

摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文

posted @ 2016-01-03 20:54 walkwalkwalk 阅读(238) 评论(0) 推荐(0) 编辑

Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Subscribeto see which companies asked this questionSh... 阅读全文

posted @ 2016-01-03 20:53 walkwalkwalk 阅读(170) 评论(0) 推荐(0) 编辑

String to Integer (atoi)

摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文

posted @ 2016-01-03 20:48 walkwalkwalk 阅读(214) 评论(0) 推荐(0) 编辑

导航