Algorithm · Point72 · Medium
A large retailer gathers weekly transaction logs from many stores. You receive an array records where each element is a string formatted as "price,count". The price is an integer amount in cents, and count tells how many transactions occurred at that exact price. The same price can show up in multiple records; when it does, add the counts together to get the total number of transactions for that price. Your task is to compute the 80th percentile price. This is the smallest…
Checking your access…