题目原文 Selection in two sorted arrays. Given two sorted arrays a[] and b[], of sizes n1 and n2, respectively, design an algorithm to find the kth largest key. The order of growth of the worst case running time of your algorithm should be logn, where n…
题目链接: http://poj.org/problem?id=2104 K-th Number Time Limit: 20000MSMemory Limit: 65536K 问题描述 You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data…
问题来源:http://www.careercup.com/question?id=6335704 问题描述: Given a N*N Matrix. All rows are sorted, and all columns are sorted. Find the Kth Largest element of the matrix. 解答: 先给出算法的时空复杂度,时间O(k * lg k),空间O(k). 算法:为了方便描述不防假设矩阵左上角的元素最小,且k<=n. 1. 取每行行首元素建…