摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2015-09-02 16:56 linqiaozhou 阅读(348) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 1,类似于Merge Sort的方法做k-1次,每次合并两个,但是这种方法超时. for(int i 阅读全文
posted @ 2015-09-02 11:45 linqiaozhou 阅读(1465) 评论(0) 推荐(0) 编辑
摘要: Valid Sudoku Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells a 阅读全文
posted @ 2015-09-02 11:08 linqiaozhou 阅读(251) 评论(0) 推荐(0) 编辑