算法、数据结构
文章平均质量分 83
liubangchuan
这个作者很懒,什么都没留下…
展开
-
LeetCode题目汇总
最近在做leetcode的题目,之后会把每个题目的程序发出来,以便做个记录,日后可以复习一下2013-05-13 20:20:17 · 93 阅读 · 0 评论 -
LeetCode Problem:在一个数组中求满足和等于一定条件的两个数
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 numbers such that they add up to the target, whe...2013-05-14 23:44:06 · 127 阅读 · 0 评论 -
LeetCode Problem:两个有序数组的中位数
Median of Two Sorted Arrays There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 这个题目...2013-05-17 00:39:14 · 171 阅读 · 0 评论 -
LeetCode Problem:链表相加
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 digit. Add the two numbers and return it as a lin...原创 2013-05-18 17:21:56 · 63 阅读 · 0 评论 -
LeetCode Problem:求字符串的最长子串,子串的字符各不相同
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For...2013-05-18 17:28:15 · 85 阅读 · 0 评论 -
LeetCode Problem:求字符串的最长回文子串
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 longest palindromic substring. 这个题目是一个很常见的面试题,有暴力穷...原创 2013-05-26 13:55:56 · 80 阅读 · 0 评论