However, the only way you can access these values is through queries to the databases.

However, the only way you can access these values is through queriesto the databases. In a single query, you can specify a value k to one of thetwo databases, and the chosen database will return the kth smallest valuethat it contains. Since queries are expensive, you would like to compute themedian using as few queries as possible.