J.P. Morgan Interview Question

They asked me coding questions