JPMorganChase interview question

I explained the concept with real-time examples from my project and wrote basic code where required.