Find top-spend categories per customer with ranking | Amazon Interview Question