2013年3月26日

Median of Two Sorted Arrays

摘要: There are two sorted arrays A and B of size m and n respectively. Find the medianof the two sorted arrays. The overall run time complexity should be O(log (m+n)).O(m + n) 解法: 1 public class Solution { 2 public double findMedianSortedArrays(int A[], int B[]) { 3 // Start typing your Java ... 阅读全文

posted @ 2013-03-26 11:48 Step-BY-Step 阅读(147) 评论(0) 推荐(0) 编辑

Two 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, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are 阅读全文

posted @ 2013-03-26 10:57 Step-BY-Step 阅读(234) 评论(0) 推荐(0) 编辑

Get Start from today

摘要: I will manage to do at least two algrithm problems from today........For each problem, considering about theTime complexity and space complexity. And try to use collabedit to write the codes.Fight On!! 阅读全文

posted @ 2013-03-26 10:32 Step-BY-Step 阅读(113) 评论(0) 推荐(0) 编辑

2013/3/25 Get start~

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2013-03-26 10:31 Step-BY-Step 阅读(0) 评论(0) 推荐(0) 编辑

导航