老师说学会写程序首先要先读懂别人的程序,这次就老师给我们留了一个读程序的作业.程序是用c#写的,以前没有接触过c#,但和c语言差不多,基本能读懂. 程序如下: using System; using System.Collections.Generic; using System.Text; namespace FindTheNumber { class Program { static void Main(string[] args) { int [] rg = {2,3,4,5,6,7,8,
题目再现 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)). 题意解析 题目意思是给两个大小为m,n的有序数组(m,n可能为0),要求找出这两个数组的中位数.并且程序的时间复杂度必须不能超过O(log(m+n)). 这道题的