Shopping Category Trip Difference

Asked at Atlassian · Coding Questions · Difficulty: Medium · Last asked Jul 3, 2025

Given product-to-category mappings and a shopping list, compare category transitions under different shopping orderings. The prompt asks for the difference in trip counts between the original order and a grouped-by-category order.

Loading the problem…