Nearest-Rank Latency Percentiles

~10 mincode completion

Implement latency_percentiles(latencies) returning the array [p50, p95, p99].

Where this shows up

~10 min

8 employers weight this skill

4 big tech firms, 1 AI product company, 1 enterprise vendor, 1 defense company, 1 quant fund. Top match scores 93.

Python
import math
import numpy as np


def latency_percentiles(latencies):
    """
    p50, p95 and p99 by the nearest-rank definition.

    Args:
        latencies: (n,) request latencies in any order

    Returns:
        array [p50, p95, p99], each an observed latency
    """
    # YOUR CODE HERE
    pass

Run your code to see results

⌘↵ runs against the visible tests

Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.