C3 AI Interview Question

Parentheses generation, two sum with mod