Compute article-type diversity per user and histogram | LinkedIn Interview Question