HCLTech Interview Question

Case class explanation, tail recursion