Pregunta de entrevista de CarGurus

Coding challenge: Metrics ingesting program via CodePen. JSON objects are streamed in, which include a metric name, source, and value. Implement a method that can give you the average of all the metrics of a given name and source.

Respuesta de la entrevista

Anónimo

28 ene 2026

Rather than logging all metric objects, keep a running tally of the count and value totals of each metric name+source combination. Be prepared to talk about how you would use mutexes to achieve "eventual consistency."