摘要: Given a linked list, remove the nth node from the end of list and return its head. 阅读全文
posted @ 2014-06-26 19:23 jdflyfly 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. 阅读全文
posted @ 2014-06-26 19:21 jdflyfly 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. 阅读全文
posted @ 2014-06-26 19:20 jdflyfly 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 阅读全文
posted @ 2014-06-26 19:19 jdflyfly 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 阅读全文
posted @ 2014-06-26 19:17 jdflyfly 阅读(168) 评论(1) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. 阅读全文
posted @ 2014-06-26 19:15 jdflyfly 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral. 阅读全文
posted @ 2014-06-26 19:14 jdflyfly 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Implement regular expression matching with support for '.' and '*'. 阅读全文
posted @ 2014-06-26 19:13 jdflyfly 阅读(1826) 评论(3) 推荐(0) 编辑
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most wa... 阅读全文
posted @ 2014-06-26 19:12 jdflyfly 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. 阅读全文
posted @ 2014-06-26 19:11 jdflyfly 阅读(327) 评论(0) 推荐(0) 编辑