Chargebee Interview Question

anaagram problem, data structure questions