Navan·Software Engineer·Technical Phone Screen
- Given an array of positive prices and a discount percentage, apply the discount only to the single most expensive item (first occurrence if there are ties), then return the floor of the total sum.
“My first instinct was to sort, which would've blown the O(n) requirement.”