JPMorganChase Interview Question

dont remember, it was leetcode mediums though