LeetCode
文章平均质量分 58
唐朝李子333
刚入门的小菜鸟。。。
展开
-
[Leetcode]4Median 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)). class Solution { public: double原创 2015-03-17 15:31:54 · 507 阅读 · 0 评论 -
[Leetcode]2Add Two Numbers
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 link原创 2015-03-17 15:04:17 · 374 阅读 · 0 评论 -
[Leetcode]3Longest Substring Without Repeating Characters
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. Fo原创 2015-03-17 15:25:02 · 450 阅读 · 0 评论 -
Leetcode 152 Maximum Product Subarray
Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [原创 2015-07-28 20:33:10 · 559 阅读 · 0 评论 -
[Leetcode]1Two Sum
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原创 2015-03-17 14:40:25 · 382 阅读 · 0 评论