随笔分类 -  leetcode

摘要:题目: 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... 阅读全文
posted @ 2015-10-07 14:45 朱菜根 阅读(493) 评论(0) 推荐(0)
摘要:题目: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint... 阅读全文
posted @ 2015-10-06 13:53 朱菜根 阅读(414) 评论(0) 推荐(0)
摘要:题目: Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding elemen... 阅读全文
posted @ 2015-10-05 19:08 朱菜根 阅读(197) 评论(0) 推荐(0)
摘要:题目: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longe... 阅读全文
posted @ 2015-10-04 16:11 朱菜根 阅读(1142) 评论(0) 推荐(0)
摘要:题目: There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity s... 阅读全文
posted @ 2015-10-03 20:07 朱菜根 阅读(473) 评论(0) 推荐(0)
摘要:题目: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette... 阅读全文
posted @ 2015-10-02 01:44 朱菜根 阅读(173) 评论(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 s... 阅读全文
posted @ 2015-10-01 13:51 朱菜根 阅读(193) 评论(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... 阅读全文
posted @ 2015-09-30 22:35 朱菜根 阅读(156) 评论(0) 推荐(0)