Millennium Management Quant Developer OA 14 Dec 2024

Popular Location Query

From the data tables, determine the location having the most companies. List the names of the employees who work in that location and the names of their companies. The output should consist of two columns: PEOPLE.NAME and COMPANIES.NAME. The rows may be in any order.

Schema

PEOPLE

NameTypeDescription
IDSTRINGUnique ID of the person
NAMESTRINGNAME of the person
COMPANY_IDSTRINGID of the company that person works for

COMPANIES

NameTypeDescription
IDSTRINGUnique ID of the company
NAMESTRINGNAME of the company
LOCATION_IDSTRINGID of the location of the company

LOCATIONS

NameTypeDescription
IDSTRINGUnique ID of the location
NAMESTRINGName of the location

Efficient Study

An e-book provider has a list of programming articles, each with a different intellectual value. As an incentive, readers receive awards based on their scores. Readers get points equal to an article's intellectual value for each article they have read twice. Given a list of articles with their page lengths, each article's intellectual value coefficient, and a limited number of pages that can be read in a day, determine the maximum achievable intellectual value from reading articles during one day.

Example
iv = [2, 4, 4, 5]
articles = [2, 2, 3, 4]
p = 15

There are n = 4 articles = [2, 2, 3, 4] that have corresponding intellectual values iv = [2, 4, 4, 5].

  • p = 15 pages max can be read per day.
  • Two best approaches to read the maximum articles are:
    • Read the first, second, and third articles (2 * articles[0] + 2 * articles[1] + 2 * articles[2] = 2 * 2 + 2 * 2 + 2 * 3 = 14 pages).
    • Read the third and fourth articles (2 * articles[2] + 2 * articles[3] = 2 * 3 + 2 * 4 = 14 pages).
  • The maximum total intellectual value is: iv[0] + iv[1] + iv[2] = 2 + 4 + 4 = 10.

Function Description
Complete the function maximumLearning in the editor below.

maximumLearning has the following parameter(s):

  • int iv[n]: an array of integers, each article's intellectual value.
  • int articles[n]: an array of integers, each article's page length.
  • int p: number of pages that can be read in one day.

Returns

  • int: integer value representing the maximum achievable intellectual value in one day of reading.

Constraints

  • 1 ≤ n ≤ 10^3
  • 1 ≤ iv[i] ≤ 10^6, where 0 ≤ i < n.
  • 1 ≤ articles[i] ≤ 100, where 0 ≤ i < n.
  • 1 ≤ p ≤ 10^3.

我们长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。

We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.

Leave a Reply

Your email address will not be published. Required fields are marked *