摘要: 题目:Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The 阅读全文
posted @ 2018-05-27 22:28 pathjh 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目:在两个排序数组中寻找第K小的数 举例: arr1=[1,2,3,4,5],arr2=[3,4,5],k=1 1是所有数中第一小的数,所以返回1 arr1=[1,2,3],arr2=[3,4,5,6],k=4 3是所有数中第4小的数,所以返回3 要求:如果arr1的长度为N,arr2的长度为M, 阅读全文
posted @ 2018-05-27 21:33 pathjh 阅读(4198) 评论(0) 推荐(1) 编辑
摘要: 题目:Longest Palindromic Substring Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. E 阅读全文
posted @ 2018-05-27 15:18 pathjh 阅读(113) 评论(0) 推荐(0) 编辑