摘要: Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: Approach #1: Dynamic programm 阅读全文
posted @ 2018-11-08 21:08 Veritas_des_Liberty 阅读(191) 评论(0) 推荐(0)
摘要: Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pair (A, B) is defined as the absolute difference bet 阅读全文
posted @ 2018-11-08 20:48 Veritas_des_Liberty 阅读(207) 评论(0) 推荐(0)
摘要: Nearly every one have used the Multiplication Table. But could you find out the k-th smallest number quickly from the multiplication table? Given the 阅读全文
posted @ 2018-11-08 17:34 Veritas_des_Liberty 阅读(298) 评论(0) 推荐(0)
摘要: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If the 阅读全文
posted @ 2018-11-08 16:34 Veritas_des_Liberty 阅读(257) 评论(0) 推荐(0)